Adds a dump device to Adaptive Server.
sp_addumpdevice {"tape" | "disk"}, logicalname, physicalname [, tapesize]
for tape drives. Enclose tape in quotes.
is for a disk or a file device. Enclose disk in quotes.
is the “logical” dump device name. It must be a valid identifier. Once you add a dump device to sysdevices, you can specify its logical name in the load and dump commands.
is the physical name of the device. You can specify either an absolute path name or a relative path name. During dumps and loads, the Backup Server resolves relative path names by looking in Adaptive Server’s current working directory. Enclose names containing non-alphanumeric characters in quotation marks. For UNIX platforms, specify a non-rewinding tape device name.
is the capacity of the tape dump device, specified in megabytes. OpenVMS systems ignore the tapesize parameter if specified. Other platforms require this parameter for tape devices but ignore it for disk devices. The tapesize should be at least five database pages (each page requires 2048 bytes). Sybase recommends that you specify a capacity that is slightly below the rated capacity for your device.
Adds a 40MB tape device. Dump and load commands can reference the device by its physical name, /dev/nrmt8, or its logical name, mytapedump:
sp_addumpdevice "tape", mytapedump, "/dev/nrmt8", 40
Adds a disk device named mydiskdump. Specify an absolute or relative path name and a file name:
sp_addumpdevice "disk", mydiskdump, "/dev/rxy1d/dump.dat"
sp_addumpdevice adds a dump device to the master.dbo.sysdevices table. Tape devices are assigned a cntrltype of 3; disk devices are assigned a cntrltype of 2.
To use an operating system file as a dump device, specify a device of type disk and an absolute or relative path name for the physicalname. Omit the tapesize parameter. If you specify a relative path name, dumps are made to—or loaded from—the current Adaptive Server working directory at the time the dump or load command executes.
Ownership and permission problems can interfere with the use of disk or file dump devices. sp_addumpdevice adds the device to the sysdevices table, but does not guarantee that you can create a file as a dump device or that users can dump to a particular device.
The with capacity = megabytes clause of the dump database and dump transaction commands can override the tapesize specified with sp_addumpdevice. On platforms that do not reliably detect the end-of-tape marker, the Backup Server issues a volume change request after the specified number of megabytes have been dumped.
When a dump device fails, use sp_dropdevice to drop it from sysdevices. After replacing the device, use sp_addumpdevice to associate the logical device name with the new physical device. This avoids updating backup scripts and threshold procedures each time a dump device fails.
To add database devices to sysdevices, use the disk init command.
Only a System Administrator can execute sp_addumpdevice.
Commands disk init, dump database, dump transaction, load database, load transaction
System procedures sp_dropdevice, sp_helpdevice