SET TAPE POSITION command using the ADMIN_CMD procedure

The SET TAPE POSITION command sets the positions of tapes for backup and restore operations to streaming tape devices. This command is only supported on Windows operating systems.

Authorization

One of the following authorities:

  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagramSET TAPE POSITIONONdeviceTOposition

Command parameters

ON device
Specifies a valid tape device name. The default value is \\.\TAPE0. The device specified must be relative to the server.
TO position
Specifies the mark at which the tape is to be positioned. Db2® for Windows writes a tape mark after every backup image. A value of 1 specifies the first position, 2 specifies the second position, and so on. If the tape is positioned at tape mark 1, for example, archive 2 is positioned to be restored.

Example

Because Db2 databases write a tape mark after every backup image, specifying a position of 1 will move the tape to the start of the second archive on the tape.
CALL SYSPROC.ADMIN_CMD( 'set tape position to 1' )

Usage notes

Command execution status is returned in the SQLCA resulting from the CALL statement.