Sybase Database Configuration

Step 1 Step 2 Step 3 Step 4 Step 5


Step 2: Create the SAMPLE Database

  • Create the SAMPLE database.
    Use Sybase's GUI or isql command line interface to create an empty database named SAMPLE.

    Using Sybase's command line interface, create a device to store the database by typing:

    1. disk init
    2. name="sample_device", physname="<Some_Dir>/sample.dat", vdevno=<device_number>, size=5000
    3. go

    4. (Size is the number of 2k blocks. There are about 512 2k blocks in 1Mb, so 5000 2k blocks is approximately 10Mb).

    Next, create the database on the device.
    1. create database SAMPLE on sample_device=10
    2. go

    3. (The "10" indicates that the database will span the entire 10Mb device file).

    Note:
    • The name is the symbolic name for the device which stores the objects that define the database.
    • The physname is the actual path to the device. <Some_Dir> should be an existing directory -- a common place is "<Sybase_Root>/data/" -- on the Sybase server. The command creates the file "sample.dat" in the directory specified.
    • The <device_number> is an unused Sybase device number.

    • List devices by typing sp_helpdevice at the command line, looking in the device_number column, and choosing a number that is not in use.

Please see Sybase documentation for more information on GUI or command line options.


Take Note!
  • Alternatively, you can create a database with any name you choose. Whatever name you give it, specify the same database name in Steps 3 and 4 when you create the corresponding DataSource object.