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.

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

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:

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:

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 :

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:

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

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