How to install the Oracle 19c sample database

In a previous tutorial, we saw how to install the Oracle 19c database server in Oracle Linux 8.5 VM. We are now going to see how to install and configure a sample Oracle Database using the provided scripts.

Install ORCLCDB
Install ORCLCDB

I was still connected as root and as you can see in the next screenshot, the Oracle 19c installation script displayed the service configuration script to execute in order to create and configure a sample Oracle Database. So I executed the “/etc/init.d/oracledb_ORCLCDB-19c configure” as root:

/etc/init.d/oracledb_ORCLCDB-19c configure
/etc/init.d/oracledb_ORCLCDB-19c configure

The script started to create the sample database…

Completing Database Creation
Completing Database Creation

… and it went on a few minutes more…

sample database configuration completed successfully
sample database configuration completed successfully

… until it finished. At the end, it took a bit less than 15 minutes to create and configure the sample Oracle Database in the VM.

The database name and SID was ORCLCDB and the configuration script recommended to change the passwords using the “sqlplus / as sysdba” command as the oracle user.

So logged in as oracle and I modified the “.bashrc” file with the “vi .bashrc” command in order to include the ORACLE variables required to access the new sample oracle database:

vi .bashrc
vi .bashrc

I tried to connect to the newly created ORCLCDB using the “sqlplus” command but I get the “Connected to an idle instance” message:

Connected to an idle instance
Connected to an idle instance

I executed the “startup” command to start the database instance:

Start the instance
Start the instance

With the sample database instance started, I could now change the default passwords for the system and sys users. I executed the “ALTER USER user_name IDENTIFIED BY new_password;” command  by replacing “user_name” and “new_password” with a proper user name and a valid password (occulted in the next screenshot):

sqlplus / as sysdba
sqlplus / as sysdba

I tried to connect to the enterprise manager by opening the” https://192.168.1.15:5500/em/” URL in a web browser but I get an error:

Error: Unable to connect
Error: Unable to connect

It seemed that not all the Oracle services were running, so I checked the status of the Oracle Listener with the “lsnrctl status” command:

lsnrctl status
lsnrctl status

And clearly something was missing, so I tried to start the listener manually with the “lsnrctl start” command:

lsnrctl start
lsnrctl start

It seemed to work, so I tried to connect to the “Oracle Enterprise Manager” again and this time I get a Warning message:

Warning: Potential Security Risk Ahead
Warning: Potential Security Risk Ahead

I clicked the “Advanced” button to see that the issue was related with a self-signed certificate. It was not an issue with this small VM that would only be used for testing purpose, so I clicked the “Accept the Risk and Continue” button:

The certificate is not trusted because it is self -signed.
The certificate is not trusted because it is self -signed.

I could now have access to the “Oracle Enterprise Manager” Login Window:

Connecting to the Oracle Enterprise Manager
Connecting to the Oracle Enterprise Manager

I entered the “sys” user credentials and I clicked the “Log in” button:

Connected to the Oracle Enterprise Manager
Connected to the Oracle Enterprise Manager

And I was now connected to the Entreprise Manager for the ORCLCDB instance and everything was working fine. I now had a sample database to play with!

Disclaimer

The information contained in this Website is for general information purposes only. We try to keep this information up to date and correct but we make no warranties of any kind about the completeness, accuracy, reliability with respect to the website, the information or the graphics contained on the website for any purpose. Any reliance you place on such information is strictly at your own risk. In no event will we be liable for any loss or damage whatsoever from the use of this Website.

The post How to install the Oracle 19c sample database appeared first on MyBIJourney

All trademarks are properties of their respective owners.
FacebookTwitterPinterestWhatsAppMail