Automatic Graceful Shutdown and Consistent Startup Method for Oracle DB on Linux
- If AUTOMATIC (the default), the database is automatically restored to its previous running condition (started or stopped) upon restart of the database host computer.
- If MANUAL, the database is never automatically restarted upon restart of the database host computer.
crsctl modify resource ora.grepora.db -attr AUTO_START=always
- ALWAYS: Restarts the resource when the server restarts regardless of the state of the resource when the server stopped.
- RESTORE: Restores the resource to the same state that it was in when the server stopped. Oracle Clusterware attempts to restart the resource if the value of TARGET was ONLINE before the server stopped.
- NEVER: Oracle Clusterware never restarts the resource regardless of the state of the resource when the server stopped.
ALTER PLUGGABLE DATABASE pdb1 SAVE STATE;
- Oracle 11gR2 documentation states the use of the dbstart and dbshut scripts are deprecated. It’s supposed to be replaced by Oracle Restart.
- The Oracle 12c documentation has no mention of the deprecation of dbstart and dbshut and has reinstated the documentation about them (as I linked above). So, feel free to use dbstart and dbshut in a supported manner for all versions of the database.
- Automating Shutdown and Startup (12.2)
- Automating Shutdown and Startup (12.1)
- Automating Shutdown and Startup (11.2)
- Automating Shutdown and Startup (10.2)
- Automating Startup and Shutdown (10.1)
- Automating Database Startup and Shutdown (9.2)
- Linux Services (systemd, systemctl)
- The Oracle Restart configuration assumes the CRS is left "enabled". Disabling it means we don't want it to start automatically. So, if you want the CRS to start with your server, it needs to be enabled. After this, to start targets, depending on configurations as mentioned in my previous post referred to this.
- Oracle will not execute any rpm change or relink automatically, as this is not part of any "restart" process. It may be required due to any configuration change or corruption, and it cannot be automated.
- Regarding gracefulness, it depends on the configuration you have on your SRVCTL too. This can be configured using stop and start option, as per the example below:
srvctl modify database -d [db_unique_name] -s [start_options] -t [stop_options]
- So, a complete command containing what was recommended on my previous post PLUS gracefulness, it would be:
srvctl modify database -d [db_unique_name] -s OPEN -t IMMEDIATE -y automatic
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
How to manage multiple MySQL binary installations with SYSTEMD
How to manage multiple MySQL binary installations with SYSTEMD
Jul 30, 2018 12:00:00 AM
7
min read
How to mine an RMAN Log
How to mine an RMAN Log
Jun 24, 2019 12:00:00 AM
3
min read
Using Oracle Linux Virtualization Manager (OLVM) to Restrict Cores

Using Oracle Linux Virtualization Manager (OLVM) to Restrict Cores
Feb 17, 2023 12:00:00 AM
5
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.