Even if you are managing a non-RAC database, in 11g, it is recommended to use “srvctl” commands to start and stop the database. But, if the database is not created using DBCA or not upgraded using DBUA, the database will not be registered in the “Oracle Restart” configuration automatically.

Oracle Restart monitors the services registered and restarts if there is an abnormal end or can stop and start the databases during server reboot. Please read Oracle Documentation to learn more about Oracle Restart.

When the database is not configured in Oracle Restart, and if you attempt to start or query the configuration using srvctl, you will see this error.

You may add the database to Oracle Restart configuration using the minimal set of parameters. For complete set of options and various srvctl options, please refer to Oracle Documentation. Here adding the database information with database name (-d option), the Oracle home location (-o option) and database parameter file (-p option). In the examples below, variables like $ORACLE_HOME, $TNS_ADMIN are used, they are setup prior. If the variables are not defined, use full path of the directory or name.

To query the configuration use the following command. You may use the “srvctl modify” option to change any of the configuration item you see below. 

When registering database, it would be appropriate to register the listener also. My recommendation is to register all the services in “Oracle Restart”. See here for all the components that can be registered with using “srvctl”.

Below, listener is registered with Oracle Restart using the listener name (-l option), the port number (-p option) and the Oracle home location (-o option).

Similar to the database configuration query, the listener configuration can be queried using “srvctl config” command.

If you are not using the default location for listener.ora file, set the TNS_ADMIN value using the “setenv” option.

Similarly, if the database requires any special environment variable to be set before starting, using the “setenv” for database as well.

The “getenv” option shows the environment variables defined for the component.


%d bloggers like this: