Seems to be the first article about Oracle on dv.io
Enable autostart with oratab
# vi /etc/oratab
orclcdb:/opt/oracle/product/19c/dbhome_1:Y
Create a unit definition file
# cd /etc/systemd/system
# vi dbora.service
[Unit]
Description=Oracle Database Service
After=network.target
[Service]
Type=forking
User=oracle
Group=dba
ExecStart=/opt/oracle/product/19c/dbhome_1/bin/dbstart /opt/oracle/product/19c/dbhome_1
ExecStop=/opt/oracle/product/19c/dbhome_1/bin/dbstart /opt/oracle/product/19c/dbhome_1
[Install]
WantedBy=multi-user.target
Reload the daemon and start the service
systemctl daemon-reload
# systemctl enable dbora
Created symlink from /etc/systemd/system/multi-user.target.wants/dbora.service to /etc/systemd/system/dbora.service.
# systemctl start dbora
#
Oracle has started properly
# su - oracle
#
# sqlplus / as sysdba
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
orclcdb OPEN
Top comments (0)