4 Oracle Database Installation and Configuration for Advanced Management Console

The database for Advanced Management Console provides data storage to host all the data.

The database stores information about MSI files, applications, deployment rules, and deployment rule sets. The database also stores information about agents, Java Runtime Environment (JRE) statistics, and Java Installer configurations. This chapter contains the following sections that describe software requirements for the Oracle Database as well as installation and configuration procedures:

Software Requirements for Oracle Database

To use Oracle Database with Advanced Management Console , download and install a supported version of the Oracle database from Oracle Database Software Downloads.

Installing Oracle Database on Windows

Note:

To install Oracle 11g database, see Oracle 11g Documentation.

This topic describes installation steps for Oracle Database 12c.

To install Oracle database for Windows operating system:
  1. Go to Oracle Database Software Downloads in your browser.
  2. Download the 64-bit .zip file. Select the.zip file and right click to select Extract All. Extract both the .zip files to the same folder.
    Don’t extract the archive using unzip command, which may result in an unsuccessful run of the setup.exe.
  3. Run the setup.exe and select the installation options according to your database and Windows user requirements.
  4. In the Specify Database Identifiers screen of the installation process, enter the Global database name (for example, amc2) and the Oracle system identifier, SID (for example, amc2). Don’t select the check box for the option Create as Container database. The Install button gets enabled.
  5. Click Install to install the product.
    Oracle Database is installed on Windows.
  6. Start the SQL Plus application. From the command-line, enter the command SQLPLUS to start SQL Plus.
From Windows Start, click Programs, Oracle-OraHomeName, Application Development, and SQL Plus.

Configuring Oracle Database on Windows

After installing Oracle database for Advanced Management Console on Windows, you need to configure it.

To configure Oracle database on Windows:
  1. Log in to SQL*Plus application with sys as sysdba and the password you opt during the installation process in the Schema Password step.
  2. Create the user (for example, amc2) and grant access to the database (for example, amc2). The database name is the one that you set inInstalling Oracle Database on Windows.
    SQL> CREATE USER amc2 IDENTIFIED BY amc2 
    DEFAULT TABLESPACE users
    QUOTA UNLIMITED ON users PASSWORD EXPIRE;
    SQL> CREATE ROLE amc2_role;
    SQL> GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE VIEW, CREATE TRIGGER to amc2_role; 
    SQL> GRANT amc2_role TO amc2;
    

    Configure your Oracle database QUOTA to UNLIMITED to ensure that enough database storage is available to support large BLOB entries, such as MSI binaries. If you encounter an issue with the SQL Create User statement, then log out of SQL*Plus application and repeat step 1 and step 2.

  3. After you successfully create the user, exit the SQL*Plus application and log back into SQL*Plus as user (for example, amc2). You are prompted to set up the password. Set up a strong password.

The Oracle Database user credentials provided in this topic are examples. The Advanced Management Console doesn’t need to know your database user credentials. Oracle database user credentials are only required to configure the Data Source connection in the application server.

Installing and Configuring the Oracle Database on Linux

The configuration requires root authority, so make sure that you can get root authority before you begin to install and configure the Oracle database. However, do not start the installer as root user.
To install and configure the Oracle database on Linux:
  1. Connect to the server by using SSH or VNC, as appropriate.
  2. Unzip your database installer. 
  3. In your shell, run the ulimit -s 10240 command . This is the setting for maximum stack size limitation, which is required for the database installation. In addition, edit the /etc/security/limits.conf file to set the following nofile, nproc, stack, and memlock values for database user deployment:
    deployment   soft   nofile    1024
     
    deployment   hard   nofile    65536
     
    deployment   soft   nproc    16384
     
    deployment   hard   nproc    16384
     
    deployment   soft   stack    10240
     
    deployment   hard   stack    32768
     
    deployment   hard   memlock    134217728
     
    deployment   soft   memlock    134217728
    
  4. Validate that /etc/pam.d/login contains the following line:
    session include system-auth
    
    .
    If /etc/pam.d/login doesn’t it, then add the following line:
    # echo ‘session include system-auth’ >> /etc/pam.d/login
    
  5. Validate that /etc/pam.d/system-auth contains the following line:
    session required pam_limits.so
    
    If /etc/pam.d/system-auth doesn’t it, then add the following line:
    # echo ‘session required pam_limits.so’ >> /etc/pam.d/system-auth
    
  6. Log in as the database software owner and validate the following shell limits:
    -bash-4.2$ ulimit -Sn
    1024
     
    -bash-4.2$ ulimit -Hn
    65536
     
    -bash-4.2$ ulimit -Su
    16384
     
    -bash-4.2$ ulimit -Hu
    16384
     
    -bash-4.2$ ulimit -Ss
    10240
     
    -bash-4.2$ ulimit -Hs
    32768
     
    -bash-4.2$
    
  7. Change to the directory where your database installer is unzipped and start the Install wizard by running the ./runInstaller command. Provide the required information and then click Next. Use the default selection in this wizard and then click Next.
  8. On the Select System Class page, select Desktop class and click Next.
  9. On the Typical Installation page, perform the following:
    1. Specify the install location information.
    2. Verify that the Global database name is orcl and then click Next.
  10. On the Create Inventory page, set the product inventory location and click Next.
  11. In the Install wizard, click OK.
    A summary of the prerequisite checks is displayed. Click Install to start the database installation. Ensure that you run the scripts during the installation.
  12. Follow the instructions in the wizard and run the scripts.
    The ENV scripts are copied to /usr/local/bin. You can change the path if you want to.
  13. Click OK in the Installation wizard to continue with the installation.
  14. When installation is completed, click Close to close the wizard, and then run the cat/etc/oratab command to check the installation information.
  15. Run the scripts under scratch/deployment/app/oraInventory. If you did not use the default Oracle base location during installation, then change it accordingly.
  16. Switch to the database file location and create an amc2 directory for PDB.
  17. Using sqlplus, connect to the database as sysdba and enter the following command to create PDB:
    CREATE PLUGGABLE DATABASE amc2 ADMIN USER amc2 identified by "amc2" DEFAULT TABLESPACE USERS DATAFILE '/scratch/deployment/app/deployment/oradata/orcl/amc2/users01.dbf' SIZE 250M AUTOEXTEND ON FILE_NAME_CONVERT=('/scratch/deployment/app/deployment/oradata/orcl/pdbseed/', '/scratch/deployment/app/deployment/oradata/orcl/amc2/');
    
  18. Change the database session to AMC2 and make sure that AMC2 is open:
    alter session set container=amc2;
    
    alter pluggable database amc2 open;
    
    1. Configure and set the authority for user AMC2.
      The following is the command to grant authority to amc2
       grant CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE VIEW to amc2;
      
      The following is the command to set the quota:
      alter user amc2 quota unlimited on users;
      
    2. Save the state of AMC2.
  19. Stop the listener and exit sqlplus.
    To stop the listener, use the following command: 
    $ORACLE_HOME/bin/lsnrctl stop
    
    .
  20. Make sure the listener port in the configuration file is set to 1521.
    You can edit the configuration file $ORACLE_HOME/network/admin/listener.ora as follows:
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = your_host_name)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
      ) 
    
  21. Edit the TNS configuration file, $ORACLE_HOME/network/admin/tnsnames.ora:
    LISTENER_AMC2 =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    AMC2 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = your_host_name)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = amc2)
        )
      ) 
    
  22. After setting the two configuration files correctly, start the listener again by entering the following command:
    $ORACLE_HOME/bin/lsnrctl start
    
  23. Make sure that the database listener is running by using the following command:
    $ORACLE_HOME/bin/lsnrctl services
    
If you are a database administrator, then use ORAchk to check for the Oracle database:
  1. Download ORAchk from MOS.

    Note:

    MOS is available at https://support.oracle.com.
  2. Copy orachk.zip on SRVDB and extract it.

  3. Run ./orachk as a root user to check the Oracle database and generate HTML report. This creates a zip file of the report that contains an HTML file. The report includes any issues that were found along with links to MOS notes or documentation to fix the issues.