Choosing a device number

Adaptive Server accepts, but does not require, the disk init vdevno parameter. If you specify a vdevno, you may choose any currently unused identifier from 1 to 2,147,483,647 (virtual device ID 0 is used by the master device). For example, specifying vdevno = 33 assigns virtual device ID 33 to a device. If you do not specify a vdevno, Adaptive Server chooses a number higher than the highest vdevno currently listed in sysdevices.

The number of database devices you can create is limited by the number of devices configuration parameter. Adaptive Server is initially configured for 10 devices. Use sp_configure to change the value for number of devices.

Your operating system may also limit the number of devices your installation can use concurrently. To the operating system, each Sybase device counts as one open file.

Adaptive Server automatically specifies the next available identifying number for the database device. This is the virtual device number (vdevno). You need not specify this number when you issue the disk init command.

If you manually select the vdevno, it must be unique among the devices used by Adaptive Server. Device number 0 represents the master device. Legal numbers are 1 – 2,147,483,647. You can choose any unused vdevno within that range.

To see the numbers already in use for vdevno, look in the vdevno column of the report from sp_helpdevice, or use the following query to list all the device numbers currently in use:

select vdevno from master..sysdevices
   where status & 2=2

Here, status & 2=2 specifies physical disk.