Installing Oracle Database 11g R2 on Windows

Views: 15.672
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 only the database software: Choose this option to install the database binaries. To configure the database, you must run the Oracle Database Configuration Wizard after installing the software.
    - Upgrade an existing database: This option installs the software binaries on a new Oracle home. At the end of the installation, you can upgrade the 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 for minimal configuration. This option is designed for those who want to install and run the database quickly.
    - Server Class - This option allows for 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 more refined memory tuning, among many others.
    Oracle - 4 Installation
  6. We will select the option "Server Class".
  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 have a license to use. In the case of the example, I will use the “Standard Edition” edition.
  12. Oracle - 7 Installation
  13. In step 8, we selected the installation location of the Oracle Database 11g binaries.
  14. Oracle - 8 Installation
  15. In step 9, we will define the type of database purpose. In the example, I’ll 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 memory settings for Oracle Database 11g. The Oracle Universal Installer calculates and displays a default value for allocating the Allocated Memory spin box and adjusts the slider accordingly. The values ​​of the slider are also limited to the maximum and minimum values ​​according to the available physical memory. You can use the slider or the spin box to specify the value (MB) for the amount of memory you want to allocate to the database according to the database requirements. The Enable Automatic Memory Management option is selected by default. This option activates the database so that it automatically distributes the memory allocated between the SGA (System Global Area) and the PGA (Program Global Area). If you deselect this option, the SGA and PGA must be scaled manually. If this option is selected, the status of the memory distribution between the memory areas will be displayed as AUTO on the screen. If the option is not selected, the memory distribution between the memory areas will be 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 the distribution of memory varies according to the types of databases:
    - General Purpose / Transaction Processing: SGA Target: 75% / Aggregate PGA Target: 25%
    - Data Warehousing SGA 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 the defaut, which would be WE8MSWIN1252 (ISO-8859), but as the character encoding standard used in the development of web systems and applications is UTF-8, I will select the option “Use Unicode” (remember validate with your development team which standard is used, to avoid conversion of charsets in the Application x Database interaction).
  22. Oracle - 13 Installation
  23. In the “Security” tab, we can select the option to activate Oracle's default security settings, which includes enabling auditing and the use of a new password profile (Oracle recommends that you use the default settings).
  24. Oracle - 14 Installation
  25. In the "Examples of schema" tab, you can check this option to create an example schema from your database to facilitate tests and studies. If you choose to install the 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 samples, 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 to manage all Oracle Oracle banks in your network centrally or whether we will use the local Database Control, allowing the sending 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: CustomizedName.Domain = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = machine_name.domain) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = Oracle_ID_name)))
      Standard format with active loadbalance: Custom_Name.domain = (description = (address_list = (load_balance = yes) (address = (protocol = tcp) (host = machine_name.domain) (port = 1521))) (connect_data = (service_name = Oracle_ID_name) (failover_mode = (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 to enter the Start Menu> My Computer> Right Button> Properties.
    After that, click on the option "Advanced system settings"> button "Environment Variables" and add the record on 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 OracleServices services and OracleOraDb11g_home1TNSListener
  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 🙂