sp_querysmobj

Description

(Tivoli Storage Manager only) Queries the Tivoli Storage Manager (TSM) for a list of the Adaptive Server backup objects.

Notesp_querysmobj is supported only when the TSM is licensed at your site.

Syntax

sp_querysmobj “syb_tsm”, “output_file”, “server_name”
	{, “database_name”, “object_name”, “dump_type”,
	“until_time”, “bs_name”} 

Parameters

syb_tsm

is the keyword that invokes the libsyb_tsm.so module that enables communication with TSM.

output_file

is the file to which Backup Server writes the list of TSM backup objects.

server_name

is the name of the Adaptive Server associated with the TSM backup objects.

database_name

is the name of the database associated with the TSM backup objects. An asterisk (*) indicates all databases.

object_name

is the name of theTSM backup object as provided in the dump database or dump transaction command. If this parameter is omitted, all backup objects are queried. An asterisk (*) indicates all backup objects.

dump_type

is the backup object type to be queried. Valid values are:

  • DB – database backup objects created by the dump database command.

  • XACT – database backup objects created by the dump transaction command.

  • * – all database backup objects. This is the default.

until_time

is the date timestamp. All backup objects matching the criteria entered in sp_querysmobj before the specified time are queried. If you omit this parameter, all backup objects matching the specified criteria are queried.

bs_name

is the name of the remote Backup Server. If bs_name is omitted, the default, SYB_BACKUP, is used.

Examples

Example 1

Queries all TSM backup objects for the Adaptive Server “demo_svr1” and writes the list to /tmp/qtsm/5_1.out.

sp_querysmobj "syb_tsm", "/tmp/qtsm/5_1.out", "demo_srv1"

Example 2

Queries all TSM backup objects for the Adaptive Server “demo_svr1” and the database pubs2 and writes the list to /tmp/qtsm/5_2.out.

sp_querysmobj "syb_tsm", "/tmp/qtsm/5_2.out", "demo_srv1", "pubs2"

Example 3

Queries all TSM database backup objects for the Adaptive Server “demo_svr1” and the database pubs2 and writes the list to /tmp/qtsm/5_3.out.

sp_querysmobj "syb_tsm", "/tmp/qtsm/5_3.out", "demo_srv1", "pubs2", "*", "DB"

Usage

For more information about Sybase support for the TSM, see Using Backup Server with IBM Tivoli Storage Manager.

Permissions

The permission checks for sp_querysmobj differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must have dump any database privilege.

Granular permissions disabled

With granular permissions disabled, you must be a user with sa_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

sp_deletesmobj