SET STOGROUP PATHS command

The SET STOGROUP PATHS command sets the storage paths of a storage group during a redirected restore operation.

A redirected restore is a restore where the storage (table space containers or storage group paths) for the restored database is different from the storage for the source database at the time that you did the backup. Using this command, you can add, change, or remove storage group paths during a redirected restore operation.

Authorization

One of the following authorities:
  • sysadm
  • sysctrl

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagramSET STOGROUP PATHS FORstoragegroup_nameON ,storage_path

Command parameters

FOR storagegroup_name
Identifies the storage group that is used by the database that you are restoring. The storage group name is a one-part name. If you renamed the storage group since you produced the backup image, the storage group name that you specify for this parameter must be the name in the backup image, not the more recent name.
ON storage_path
Specifies a new path for an existing storage group that is defined in the database you are restoring. storage_path is a string that specifies one of the following types of paths:
  • An absolute path in which containers for automatic storage table spaces are to be created. The maximum length of a path is 175 characters.
  • For Windows operating systems, the letter name of the drive on which containers for automatic storage table spaces are to be created must be specified.

The storage path must exist and be accessible on each database partition unless database partition expressions are used.

Usage notes

  • This command cannot be run outside of a database redirected restore process. An error (SQL1638N; SQLSTATE 5U057) results if it is issued at any other time, including if all table spaces associated with the storage group are being restored during a table space restore.
  • This command can only be issued on the catalog database partition.
  • A backup of a database keeps a record of all the storage group paths in use by the database being backed up. During a restore, all storage paths listed in the backup are checked to see if they currently exist and are accessible. If one or more of the storage paths is inaccessible for any reason, the restore will fail. In order to allow a restore in such a case, the redirecting of storage group paths is supported during the restore.
  • Any storage groups that have their paths redefined during a restore operation will not have any changes to their storage paths or media attributes replayed during a subsequent roll forward operation.