Installing Oracle Database 11g R2 on Windows

Views: 14.569
Reading Time: 8 minutes

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.

  1. Run the file setup.exe to start the installation
  2. Oracle - 1 Installation
  3. In the first installation screen, we can set an email to receive updates from Oracle. This step can be skipped if you wish.Oracle - 2 Installation
  4. 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.
    Oracle - 3 Installation
  5. 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.
    Oracle - 4 Installation
  6. Let's select the "Server Class" option.
  7. 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.
  8. Oracle - 5 Installation
  9. In step 5, we can choose the language of the product to install.
  10. Oracle - 6 Installation
  11. 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.
  12. Oracle - 7 Installation
  13. In step 8, we select the installation location of the Oracle Database 11g binaries.
  14. Oracle - 8 Installation
  15. In step 9, we will define the purpose type of the database. In the example, I will select the option “General Purpose / Transaction Processing”
  16. Oracle - 9 Installation
  17. 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.
  18. Oracle - 11 Installation
  19. 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%
  20. Oracle - 12 Installation
  21. 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).
  22. Oracle - 13 Installation
  23. 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).
  24. Oracle - 14 Installation
  25. 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.
  26. Oracle - 15 Installation
  27. 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.
  28. Oracle - 16 Installation
  29. 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.
  30. In step 14, we set the automatic database backup options
  31. Oracle - 19 Installation
  32. 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.
  33. Oracle - 20 Installation
  34. In step 16, Oracle Universal Installer will evaluate your machine for minimum installation requirements.
  35. Oracle - 21 Installation
  36. In step 17, Oracle Universal Installer will show you a summary of the selected settings.
  37. Oracle - 22 Installation
  38. In step 18, the progress of installing Oracle Database 11g will be shown.
  39. Oracle - 23 Installation
  40. Oracle - 24 Installation
  41. Oracle - 25 Installation
  42. Oracle Database 11g successfully installed. Let's now test the bank connection
  43. Oracle - 26 Installation
  44. All right with installing Oracle Database 11g

Configuring to allow remote connections

  1. 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.
  2. 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 \
  3. Oracle Client - 1 Configuration
  4. 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.
  5. Oracle Client - 2 Configuration Oracle Client - 3 Configuration
  6. Example listener.ora file:
  7. Open Windows Service Management (Start> Run> services.msc) and start the OracleServices <Your_SID> and OracleOraDb11g_home1TNSListener services.
  8. Open the DOS prompt and type the command: lsnrctl status to validate that the listener is up and running
    Oracle Client - 4 Configuration

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 🙂