Oracle Database Installation and Configuration Study Notes

Oracle Database Installation and Configuration Notes

Overview of Installation Process

  • Purpose: Install Oracle database software and set up the HR user account.

  • **Tools Covered: ** SQL Plus, SQL CL, and SQL Developer.

Steps of Installation

  1. Prerequisites

    • Ensure the Oracle software is installed.

    • Log into the system as the Oracle user.

    • Navigate to the directory of the Oracle installer: cd /u01/app/oracle/dbhome_19.

  2. Run the Installer

    • Execute the installer by running the runInstaller file.

    • Create Database Options:

      • Select to create a single instance database and install software concurrently.

      • Choose between desktop class or server class; for this installation, use server class.

      • Click Next to proceed.

  3. Select Edition

    • Default Edition: Enterprise Edition (preferred for its additional features).

    • Accept the default Oracle base directory (same as Grid Infrastructure install).

    • Click Next.

  4. Database Configuration

    • Options:

      • Choose between General Purpose or Data Warehousing; select Data Warehousing.

      • Set the database name to ORCL.

      • Specify creation of a Container Database.

      • Set the Pluggable Database (PDB) name to ORCLPDB.

      • Click Next.

  5. Memory Allocation

    • Leave memory allocation at default settings.

  6. Sample Schemas Installation

    • Check the box to install sample schemas with the database software.

  7. Storage Management

    • Determine whether to use the file system or Oracle Automatic Storage Management (ASM).

      • Use ASM since it is already set up.

  8. Enterprise Manager Registration

    • Choose not to register with Enterprise Manager at this time.

  9. Recovery Manager

    • Select not to enable Recovery Manager at this time.

  10. ASM Disk Groups

    • Specify where the ASM disk groups are coming from.

    • Select the only available disk group and click Next.

  11. Account Passwords

    • Specify the same password for all accounts by entering it into both password fields.

    • Accept all default group names.

  12. Scripts Execution

    • Decide against automatically running configuration scripts. This will be done manually later.

    • Click Next.

  13. Environment Check

    • The installer will check the environment for any issues.

    • Review the summary screen; if satisfactory, click Install to commence installation.

  14. Configuration Script Execution

    • Once the installation reaches approximately halfway, a prompt for configuration scripts will appear.

    • Copy the displayed command, open a root session, paste the command, and execute it.

    • Accept all defaults on configuration script execution.

    • Return to the installer once done and click OK to resume installation.

  15. Completion of Installation

    • Upon seeing a success page, click Close to finalize the installation.

Post-Installation Steps

  1. Verify Database Creation

    • Check the /etc/oratab file for the new database entry, which should read ORCL.

  2. Set Environment to Point to New Database

    • Use the command: source /u01/app/oracle/product/19c/dbhome_1/network/admin/oraenv ORCL to set the terminal environment to the new database.

  3. Connect to the Database

    • Connect to the database using SQL Plus with the command: sqlplus / as sysdba.

  4. Pluggable Database Configuration

    • Set the state of the PDB (ORCLPDB) to auto-start using:

ALTER PLUGGABLE DATABASE ORCLPDB AUTOOPEN;
  1. HR User Setup

    • Navigate to the PDB:

ALTER SESSION SET CONTAINER=ORCLPDB;
  • Modify the HR user account:

ALTER USER HR IDENTIFIED BY HR ACCOUNT UNLOCK;
  • Ensure the HR user account is enabled and set its password to HR.

Additional Setup

  • Install and configure the following SQL tools to maximize the usage of Oracle Database 19:

    • SQL Plus

    • SQL CL

    • SQL Developer

Conclusion

  • Database and HR user setup complete, Oracle Database 19 is now ready for use.