Reports information about a particular device or about all Adaptive Server database devices and dump devices.
sp_helpdevice [devname]
is the name of the device about which to report information. If you omit this parameter, sp_helpdevice reports on all devices.
Displays information about all the devices on Adaptive Server:
sp_helpdevice
device_name physical_name description ----------- -------------- ------------ tapedump1 /dev/rmt4 disk, dump device 16 tapedump2 /dev/rst0 tape, 625MB, dump device 3 master /work2/Devices/mart8K.dat special, dsync on, directio off, defaultdisk, physical disk, 250.00MB pubs_2_dev /work2/Devices/pubs_2_dev.dat special, dsync on, directio off, physical disk, 10.00MB status cntrltype vdevno vpn_low vpn_high ------ --------- ------ ------- -------- 16 2 0 0 20000 16 3 0 0 20000 3 0 0 0 127999 16386 0 1 0 5119 (4 rows affected)
Reports information about the dump device named diskdump:
sp_helpdevice diskdump
sp_helpdevice displays information on the specified device, when devname is given, or on all devices in master.dbo.sysdevices, when no argument is given.
The sysdevices table contains dump devices and database devices.
Database devices can be designated as default devices, which means that they can be used for database storage. This can occur when a user issues create database or alter database and does not specify a database device name or gives the keyword default. To make a database device a default database device, execute the system procedure sp_diskdefault.
Add database devices to the system with disk init. Add dump devices with sp_addumpdevice.
If you issue sp_helpdevice against a single device, it displays a list of allocated fragments on that device.
The number in the “status” column corresponds to the status description in the “description” column.
The “cntrltype” column specifies the controller number of the device. The “cntrltype” is 2 for disk or file dump devices and 3–8 for tape dump devices. For database devices, the “cntrltype” is usually 0 (unless your installation has a special type of disk controller).
The “vdevno” column is 0 for dump devices, 0 for the master database device, and 1 or higher for other database devices.
The “vpn_low” and “vpn_high” columns represent virtual page numbers, each of which is unique among all the devices in Adaptive Server.
Any user can execute sp_helpdevice.
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 |
|
Commands disk init, dump database, dump transaction, load database, load transaction
System procedures sp_addumpdevice, sp_deviceattr, sp_diskdefault, sp_dropdevice, sp_logdevice
Copyright © 2005. Sybase Inc. All rights reserved. |