Create Sybase Device

Devices are files or portions of a disk that stores databases and database objects. We can initialize devices using raw disk partitions or operating system files. We can create Sybase devices using disk init command.

Syntax to Create Sybase Device:

disk init name = "device_name", physname = { 'physical_name' | 'cache_name'} skip_alloc={true | false}, [vdevno = virtual_device_number,] size = number_of_blocks [, type = 'inmemory' ] [, vstart = virtual_address , cntrltype = controller_number] [, dsync = {true | false}] [, directio = {true | false}] [, instance = "instance_name"]

Examples to Create Sybase Device:

1. Create Device with 500MB and name is data01.

disk init name="data01", physname="/opt/sybase/data01.dat", skip_alloc="true", size="500M"

2. Create another device for log with the name log01 and size=100M.

disk init name="log01", physname="/opt/sybase/log01.dat", skip_alloc="true", size="100M"

3. How to information about list of devices and space available in those.

sp_helpdevice go

4. To know information about particular device, like total size, used space and free size:

sp_helpdevice data01 go

Above steps in the following video, please subscribe this channel.