sp_volchanged

Description

Notifies the Backup Server that the operator performed the requested volume handling during a dump or load.

Syntax

sp_volchanged session_id, devname, action
	[, fname [, vname]]

Parameters

session_id

identifies the Backup Server session that requested the volume change. Use the @session_id parameter specified in the Backup Server’s volume change request.

devname

is the device on which a new volume was mounted. Use the @devname parameter specified in the Backup Server’s volume change request. If the Backup Server is not located on the same machine as the Adaptive Server, use the form:

device at backup_server_name

action

indicates whether the Backup Server should abort, proceed with, or retry the dump or load.

fname

is the file to be loaded. If you do not specify a file name with sp_volchanged, the Backup Server loads the file = filename parameter of the load command. If neither sp_volchanged nor the load command specifies which file to load, the Backup Server loads the first file on the tape.

vname

is the volume name that appears in the ANSI tape label. The Backup Server writes the volume name in the ANSI tape label when overwriting an existing dump, dumping to a brand new tape, or dumping to a tape whose contents are not recognizable. If you do not specify a vname with sp_volchanged, the Backup Server uses the dumpvolume value specified in the dump command. If neither sp_volchanged nor the dump command specifies a volume name, the Backup Server leaves the name field of the ANSI tape label blank.

During loads, the Backup Server uses the vname to confirm that the correct tape has been mounted. If you do not specify a vname with sp_volchanged, the Backup Server uses the dumpvolume specified in the load command. If neither sp_volchanged nor the load command specifies a volume name, the Backup Server does not check the name field of the ANSI tape label before loading the dump.

Examples

Example 1

The operator changes the tape, then issues the command:

sp_volchanged 8, "/dev/nrmt4", RETRY

The following message from Backup Server indicates that a mounted tape’s expiration date has not been reached:

Backup Server: 4.49.1.1: OPERATOR: Volume to be overwritten on
'/dev/rmt4' has not expired: creation date on this volume is Sunday, Nov. 15, 1992, expiration date is Wednesday, Nov. 25, 1992.
Backup Server: 4.78.1.1: EXECUTE sp_volchanged
        @session_id = 8,
        @devname = '/auto/remote/pubs3/SERV/Masters/testdump',
        @action = { 'PROCEED' | 'RETRY' | 'ABORT' }

Usage

Permissions

Any user can execute sp_volchanged.

See also

Commands dump database, dump transaction, load database, load transaction

Utility isql