stop service

Stops the specified global services.

Syntax

stop service [-gdspool gdspool_name]
             [-service service_name_list]
             [{-database db_name |
                 -override -connect connect_identifier [-pwd password]}]
             [-force]
             [-drain_timeout time]
             [-stop_option {NONE|IMMEDIATE|TRANSACTIONAL}]

Options

Table 2-113 GDSCTL stop service Options

Option Description
-connect connect_identifier

Specify an Oracle Net connect descriptor or net service name that resolves to a connect descriptor for the database (or shard).

-database db_name

Specify the name of the database on which you want to stop the service. If you do not specify this option, then GDSCTL stops the services on all databases on which the service is currently running.

—drain_timeout

Set drain time in seconds.

-force

If you use this option, then GDSCTL disconnects all sessions when the service is stopped, requiring the sessions using the service to reconnect (potentially to a different instance).

If you do not use this option, then the sessions that are connected to a database using this service remain connected, but new sessions cannot be established to the service.

-gdspool gdspool_name

Specify the name of the GDS pool in which the service that you want to stop is located. If not specified and there is only one GDS pool with access granted to user, that GDS pool is used as the default GDS pool.

-override

This option causes the command to execute without updating the global service manager catalog. You can use this option when the catalog database is unavailable.

During normal operation, you should not use this option.

-pwd password

Specify the password of the GSMUSER in the specified database.

-service service_name

Specify a comma-delimited list of global service names you want to stop. If you do not use this option, then GDSCTL stops all the services in the database pool.

—stop_option

Set the default stop option to NONE, IMMEDIATE, or TRANSACTIONAL

Usage Notes

You must connect to the catalog database as a user with the pool administrator privileges, using the command connect before running this command.

If -service is not specified, all global services of GDS pool are stopped.

If -database is not specified, the global services are stopped on all of the databases.

If -force is specified, all sessions are disconnected, requiring the session using the global service to reconnect (potentially to another instance). If -force is not specified, then sessions already connected to this global service stay connected, but new sessions cannot be established to the global service.

If -override is specified, the command is executed without connecting to the GDS catalog. Use this option when the GDS catalog is unavailable. It is not recommended for use under normal operation.

Example

Stop the service SALES_REPORT, on all databases in the database pool READERFARM.

GDSCTL> stop service -gdspool readerfarm -service sales_report