relocate service
Stops a service on one database and starts the service on a different database.
Syntax
relocate service [-gdspool gdspool_name]
-service service_name
-old_db db_name
-new_db db_name
[-force]
[-override [-oldpwd oldpassword] [-newpwd newpassword]]Options
Table 2-70 GDSCTL relocate service Options
| Option | Description |
|---|---|
-force |
If you use this option, then all sessions are disconnected when the service is moved, 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 stay connected, but new sessions cannot be established to the service. |
-gdspool gdspool_name |
Specify the name of the database pool where the service is located. If not specified and there is only one |
-new_db db_name |
Specify the name of the database to which you want to move the service. |
-newpwd newpassword |
Specify the password for the GSMUSER in the database to which the service is being relocated (the target database). |
-old_db db_name |
Specify the name of the database where the service is currently located. |
-oldpwd oldpassword |
Specify the password for the GSMUSER in the source database, or the database where the service is currently located. |
-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. |
-service service_name |
Specify the name of the global service you are relocating. |
Usage Notes
Unlike using the modify service command to change the location of a service, this command does not change the underlying configuration. This command temporarily relocates a service to run on another database.
If -force is not specified, then the global service must have been started on the old database and not running on the new database prior to command execution. If -force is not specified, then sessions already connected to this global service stay connected, but new sessions cannot be established.
If -override is specified the command will be executed without going to the GDS catalog. Use this option when the GDS catalog is unavailable. It is not recommended for use under normal operation.
If you attempt to use this command on a service that was previously configured with the -preferred_all option, then GDSCTL returns an error.
You must connect to the catalog database as a user with the pool administrator privileges, using the command connect before running this command
Example
Relocate the service SALES_REPORT in the READFARM database pool from the DB2 database to the DB3 database.
GDSCTL> relocate service -gdspool readfarm -service sales_report -old_db db1
-new_db db3