In this post, I will demonstrate how to install Oracle Database 11g in the Windows environment, which is widely used today for the ease and practicality of the Microsoft operating system.
- Run the file setup.exe to start the installation
- In the first installation screen, we can set an email to receive updates from Oracle. This step can be skipped if you wish.
- In step 2, we can choose the type of installation:
- Create and configure a database: Choose this option to create a new database along with the schema examples.
- Install database software only: Choose this option to install database binaries. To set up the database, you must run the Oracle Database Configuration Wizard after software installation.
- Upgrade an existing database: This option installs the software binaries in a new Oracle home. At the end of installation, you can upgrade your existing database.
- In step 3, we can choose our bank installation class
- Desktop Class: This option includes an initial database and allows minimal configuration. This option is designed for those who want to install and run the database quickly.
- Server Class - This option allows more advanced configuration options. Advanced configuration options available when using this option include Oracle RAC, Automatic Storage Management, backup and recovery configuration, integration with Enterprise Manager Grid Control, and finer memory tuning, among many others.
- Let's select the "Server Class" option.
- In step 4, we will define whether our database will be a single instance or a Real Application Clusters (RAC) installation, which requires more than one server. I will install as a single instance and then post a RAC install post.
- In step 5, we can choose the language of the product to install.
- In step 7, we must choose the edition of the database and you must select the edition in which you are licensed to use. In the case of the example, I will use the “Standard Edition” edition.
- In step 8, we select the installation location of the Oracle Database 11g binaries.
- In step 9, we will define the purpose type of the database. In the example, I will select the option “General Purpose / Transaction Processing”
- In step 11 is where we define the name of the database and the name of the instance we are installing. The global name is unique per database and the SID is unique per instance, remembering that a database can have multiple instances and the SID will be different for each instance.
- In step 11, we can configure the Oracle Database 11g memory settings. Oracle Universal Installer calculates and displays a default value for Allocated Memory spin box allocation and adjusts the slider accordingly. Slider values are also limited to maximum and minimum values based on available physical memory. You can use the slider bar or spinner box to specify the value (MB) for the amount of memory you want to allocate to the database according to database requirements. The Enable Automatic Memory Management option is selected. by default. This option enables the database to automatically distribute the allocated memory between the System Global Area (SGA) and the Program Global Area (PGA). If you deselect this option, the SGA and PGA must be scaled manually. If this option is selected, the status of memory distribution between memory areas will be displayed as AUTO on the screen. If not selected, the distribution of memory between memory areas is static. The reason for the allocation of memory allocated between memory areas depends on the configuration of the database you have selected. According to Oracle documentation, the proportion of memory distribution varies by database type:
- General Purpose / Transaction Processing: EMS Target: 75% / PGA Aggregate Target: 25%
- SGA Data Warehousing Target: 60% PGA Target / Aggregate: 40%
- In the "Character Set" tab, we can define the character encoding of our database. You can use defaut, which would be WE8MSWIN1252 (ISO-8859), but as the character encoding standard used in developing systems and web applications is UTF-8, I will select the “Use Unicode” option (remember to validate with your development team which standard is used to avoid charset conversions in the Application x Database interaction).
- In the "Security" tab, we can select to enable Oracle's default security settings, which includes audit activation and the use of a new password profile (Oracle recommends that you use the default settings).
- In the "Schema Examples" tab, you can check this option to create an example schema from your database to facilitate testing and studies. If you choose to install schema examples, the Oracle Database Configuration Wizard creates the EXAMPLES tablespace in the database, requiring 150 MB of disk space. If you are using raw devices for database storage, you must create and specify a separate raw device for this tablespace. If you choose not to install the schema examples, you can create them manually in the database after installation. For obvious reasons, I do not recommend checking this option in Production environments.
- In step 12, we can define whether we will use Oracle Enterprise Manager 11g Grid Control, which is a tool for centrally managing all Oracle Oracle databases on your network or whether we will use local Database Control, allowing uploading of email notifications.
- In step 13 the Oracle Database 11g file system is defined. By selecting the first option, who manages the I / O flow is the operating system and the files are created physically on disk. As for ASM, the I / O stream manages the database itself, and this often translates into performance, safety and reliability gains. Unfortunately, my VM is 32 bits and ASM is not supported on this platform. Therefore, I will mark the first option.
- In step 14, we set the automatic database backup options
- In step 15 the passwords of the Oracle Database 11g system schemas are set. We have the option of setting a password for each scheme or using the same password for all. For Production environments, I recommend creating a password for each scheme for security reasons.
- In step 16, Oracle Universal Installer will evaluate your machine for minimum installation requirements.
- In step 17, Oracle Universal Installer will show you a summary of the selected settings.
- In step 18, the progress of installing Oracle Database 11g will be shown.
- Oracle Database 11g successfully installed. Let's now test the bank connection
- All right with installing Oracle Database 11g
Configuring to allow remote connections
- Before we get started, we need to clarify 3 key concepts:
- sqlnet.ora: Configuration file that allows you to set Oracle Client connection options, such as authentication form (SQLNET.AUTHENTICATION_SERVICES = (NTS)), instance name resolution form (NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)), default domain, etc. .
- tnsnames.ora: Settings file that allows you to define the connection string of each instance you will access.
Standard format: CustomName.Domain = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = hostname.domain) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORacleSID)))
Standard format with active loadbalance: CustomName.domain = (description = (address_list = (load_balance = yes) (address = (protocol = tcp) (host = hostname.domain) (port = 1521))) (connect_data = (service_name = oracleSID_name) (failover_mode = ( type = select) (method = basic))))
- listener.ora: Oracle Database configuration file that allows remote connections to your database.
- Set the default directory to store client settings (tnsnames.ora, sqlnet.ora, and listener.ora). For this we will create an environment variable in Windows. This will allow you to manually set the location where your tnsnames.ora file will be located, even if you have more than one version of Oracle Client installed on your machine, preventing each version of Oracle Client from using different settings. If you do not want to use this option, the default directory where the sqlnet.ora, listener.ora file is located and where you should create your tnsnames.ora is C: \ oracle \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN \
- Another way to configure this is by going to Start Menu> My Computer> Right Button> Properties.
After that, click on the option “Advanced System Settings”> “Environment Variables” button and add the registry in this screen.
- Example listener.ora file:
PgSQL123456789# Meu LISTENERLISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = dba)(PORT = 1521))))ADR_BASE_LISTENER = C:\oracle
- Open Windows Service Management (Start> Run> services.msc) and start the OracleServices <Your_SID> and OracleOraDb11g_home1TNSListener services.
- Open the DOS prompt and type the command:
lsnrctl statusto validate that the listener is up and running
Note: I do not recommend using Oracle with Windows in Production environments, as the performance and stability of the bank running on Linux (especially Oracle Linux on x64 platform or Solaris on x86 platform) is far superior. In the future I will create an Oracle installation post on Linux 🙂