You can start and stop the database manually, set it to automatically after the system shuts down and starts, or using Enterprise Manager.
Shutting Down and Starting Up Using the Configuration Services Script
You can start and stop the database using the
Execute these commands as
$ sudo -s
Run the following command to start the listener and database:
# /etc/init.d/oracle-xe-18c start
Run the following command to stop the database and the listener:
# /etc/init.d/oracle-xe-18c stop
Run the following command to stop and start the listener and database:
# /etc/init.d/oracle-xe-18c restart
Shutting Down and Starting Up Using SQL*Plus
You can shut down and start the database using SQL*Plus.
To shutdown the database, login to the oracle user with its environment variables set for access to the XE database, and issue the following SQL*Plus command:
$ sqlplus / as sysdba SQL> SHUTDOWN IMMEDIATE
To start the database, issue the commands:
SQL> STARTUP SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
Automating Shutdown and Startup
Oracle recommends that you configure the system to automatically start Oracle Database when the system starts, and to automatically shut it down when the system shuts down. Automating database shutdown guards against incorrect database shutdown.
$ sudo -s
For Oracle Linux 6, run these commands:
# /sbin/chkconfig oracle-xe-18c on # /sbin/service oracle-xe-18c start
# systemctl daemon-reload # systemctl enable oracle-xe-18c