INF: How to Calculate the Virtual Device Number
ID: Q39138
|
The information in this article applies to:
-
Microsoft SQL Server versions 4.2x for OS/2
The following article describes how the virtual device number is
calculated and where this information is stored.
Upon execution of the stored procedure SP_HELPDEVICE, one of the
fields returned is a virtual device number (V_DEVNO). This number is
the virtual device number that was entered when the disk device was
created (using DISK INIT).
However, if you examine all of the system tables, there appears to be
no table that holds a virtual device number. The number is stored in
the LOW column in the SYSDEVICES table in the MASTER database.
Version 4.2 uses the following formula:
device_number = convert (tinyint,substring(convert
(binary(4),sysdevices.low),spt_values.low,1))
where spt_values.type = 3
spt_values.number = 3
sysdevices.name = "<specific device name>"
Additional query words:
4.20 4.20a 4.20b
Keywords : SSrvAdmin
Version : 4.20
Platform :
Issue type :
Last Reviewed: March 6, 1999