Forum Stats

  • 3,770,570 Users
  • 2,253,135 Discussions


Stop and Start databases from rc.d

Hello All,

We are using shell scripts, which are manually run to stop and start the databases before and after server maintenance and or patching the databases. We check the status and role of the database via the scripts and bring back the database in the status and role it was before stopping the database.

I am in the process of setting up scripts in rc.d for starting and stopping 19c databases, to get away from manual running of scripts.

For example the goal is as follows:

If the database is in STANDBY mode, and the database is stopped for server maintenance, when the database is brought back up it should be brought back in STANDBY mode. Similarly if a database is down for some reason, it should not be started.

In essence is it possible to check the status of database and role of database, and bring back the database in the state and role it was before stopping the database while using the rc.d scripts?

Please let me know.

Thanks in Advance.

Best Answer