How to autostart the ORCLCDB sample DB on Oracle Linux 8.5

In a previous tutorial I described how I installed the Oracle 19c ORCLCDB sample database on an Oracle Linux 8.5. After the installation, I had to manually start up the DB instance and the “Oracle Listener”. We are going to see in this page how to start automatically these two elements.

Start ORCLCDB
Start ORCLCDB

After rebooting the VM, I tried to connect to the “Oracle Enterprise Manager” with a Web Browser, but I get the following error:

Error: Unable to connect
Error: Unable to connect

The explanation was that the ORCLCDB database and “Oracle Listener” were not running. I could have started them manually as I did in this page but I preferred to configure them to autostart with the VM.

First, I checked the “/etc/oratab” file to see if the instance was configured to be brought up automatically at system start:

/etc/oratab file
/etc/oratab file

And as you can see in the previous screenshot, the value of the last parameter for the ORCLCDB entry was ‘N‘, meaning that this instance should not be brought up at system boot time.

The solution was simple, I modified the value to ‘Y‘ using the vi editor:

vi /etc/oratab
vi /etc/oratab

Then I checked if the service used to startup the ORCLCDB instance and the “Oracle Listener” was enabled with the “systemctl is-enabled oracledb_ORCLCDB-19c” command :

systemctl is-enabled oracledb_ORCLCDB-19c
systemctl is-enabled oracledb_ORCLCDB-19c

And it was disabled as I expected. The solution was again very simple: I enabled it with the “sudo systemctl enable oracledb_ORCLCDB-19c” command and I checked the result with the “systemctl is-enabled oracledb_ORCLCDB-19c” command:

sudo systemctl enable oracledb_ORCLCDB-19c
sudo systemctl enable oracledb_ORCLCDB-19c

The service was now enabled, so I rebooted the VM to check if I could connect to the “Oracle Enterprise Manager” after a restart:

https://192.168.1.16:5500/em
https://192.168.1.16:5500/em

And this time everything worked properly: after a few seconds, the web browser displayed the login window. It meant that the database instance and “Oracle Listener” had been brought up at system boot time properly.

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 autostart the ORCLCDB sample DB on Oracle Linux 8.5 appeared first on MyBIJourney

All trademarks are properties of their respective owners.
FacebookTwitterPinterestWhatsAppMail