Creating .dat files for database devices

If you choose to create a new device, use the disk init command to specify the drive, path, and file name of the database device.

WARNING! Do not place Adaptive Server devices on network drives, as this causes unpredictable system behavior. Also, if your Adaptive Server uses a network drive, you cannot start the server as an automatic Windows service.

StepsCreate a database device using the file d:\devices\user1.dat

  1. If the d:\data directory does not exist, create it from the Windows command-prompt:

    d:\> mkdir data
    
  2. Start isql and connect to Adaptive Server using the “sa” account:

    d:\sybase\bin> isql -Usa -Ppassword -Sserver_name
    
  3. Create the device using a disk init statement similar to the following example:

    1> disk init
    2> name = "user_device1",
    3>physname = "d:\data\user1.dat",
    
    4>size = 4M
    
    5> go
    

    This example creates a 4MB device, without an actual device number. To use a specific number, run sp_helpdevice to determine the number of an available device, and enter that number using “vdevno = (number)”.

For more information about sp_helpdevice and the disk init command, see the System Administration Guide: Volume 2 and the Reference Manual: Commands.

NoteRaw partitions for database devices provide little performance advantage over files as database devices and might have been favored in past releases for cache coherence and security. However, because the Windows file system now addresses these concerns, it is recommended that you do not use raw partitions.