DB2 10.5 for Linux, UNIX, and Windows

SNAP_GET_STO_PATHS table function

The SNAP_GET_STO_PATHS table function returns snapshot information from the storage_paths logical data group.

Note: This table function has been deprecated and replaced by the ADMIN_GET_STORAGE_PATHS table function - retrieve automatic storage path information.
Read syntax diagramSkip visual syntax diagram
>>-SNAP_GET_STO_PATHS--(--dbname--,--member--)-----------------><

The schema is SYSPROC.

Table function parameters

dbname
An input argument of type VARCHAR(255) that specifies a valid database name in the same instance as the currently connected database when calling this function. Specify a database name that has a directory entry type of either "Indirect" or "Home", as returned by the LIST DATABASE DIRECTORY command. Specify the NULL value to take the snapshot from the currently connected database.
member
An input argument of type INTEGER that specifies a valid database member number. Specify -1 for the current database member, or -2 for all active database partitions. An active database member is a member where the database is available for connection and use by applications.

If the null value is specified, -1 is set implicitly.

If both parameters are set to NULL, the snapshot will be taken only if a file has not previously been created by the SNAP_WRITE_FILE stored procedure for the corresponding snapshot API request type.

Authorization

One of the following authorities is required to execute the function:
  • EXECUTE privilege on the function
  • DATAACCESS authority
To access snapshot monitor data, one of the following authorities is required:
  • SYSMON authority
  • SYSCTRL authority
  • SYSMAINT authority
  • SYSADM authority

Default PUBLIC privilege

In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.

The function returns the following table.

Table 1. Information returned by the SNAP_GET_STO_PATHS table function
Column name Data type Description or corresponding monitor element
SNAPSHOT_TIMESTAMP TIMESTAMP snapshot_timestamp - Snapshot timestamp
DB_NAME VARCHAR(128) db_name - Database name
DB_STORAGE_PATH VARCHAR(256) db_storage_path - Automatic storage path