3.2.3 Oracle Database Creation

Note!

If you want to create the Oracle database in Amazon Web Services, skip to 3.2.4 Oracle Database Creation in Amazon Web Services.

The creation of the database must be made by the oracle UNIX user, or another UNIX user with the same privileges, on the machine where Oracle is installed. The oracle UNIX user is assumed in this installation.

Make sure that all previously defined directories, specified in the install.xml file, exist and are writable for the oracle user, then follow these steps: 

  1. Make sure the environment variables for Oracle are set. For further information, see 3.1.1 Environment Variables
     
  2. Make sure the Oracle data directories exist. These directories must be owned by the Oracle user. For further information see 3.1.3.2 Properties for Oracle.

  3. Configure and start an Oracle listener for the database instance. The working directory for the listener is $ORACLE_HOME/network/admin

    Edit the listener.ora file to match what is set in install.xml. See Appendix A - Oracle Home Settings for an example.

    When the listener has been configured, it needs to be restarted:

    $ lsnrctl stop
    $ lsnrctl start

  4. Create the Oracle database instance. The working directory is oracle.

    $ source ./oracle_create_instance.sh

    Depending on the hardware and the size of the database, this command may take up to one hour to execute. If no error occurred, the database creation will now be completed and the rest of this section can be ignored.

    Hint!

    When the instance creation script has been executed, there are three log files in the /tmp directory that can be used for trouble shooting. The mz.log file contains Oracle responses from the database creation, the mzuser.log file contains Oracle responses from the user creation, and the mz_db.log file contains Oracle responses from the table creations.

       

  5. If the script fails: 

    Cleanup the system before the next try:
    • Start SQL*Plus:
      $ sqlplus "/ as sysdba"
    • Terminate the bad instance:
      SQL> shutdown abort
      SQL> quit
    • Remove any files created by Oracle in any of the previously defined directories for Oracle data.

If there is a need to change any installation parameter defined in the file install.xml, the installation must be restarted from the generation step. For further information, see Generation of Oracle Database Definition Files above.