Database creation in Sybase

We need to follow the below steps to create database

Step1: Login with isql

Step2: check the file system space before initializing devices 

Step3: if we are good with file system space then create devices using disk init.

Step4: create database using create database command.

On UNIX/Linux:

1> use master

2> go

1> disk init

2> name='SEC_data_001' ,physname='/sybase/SEC/data/SEC_data_001.dat' ,size='100M'

3> go

1> disk init

2> name='SEC_log_001' ,physname='/sybase/SEC/log/SEC_log_001.dat' ,size='50M'

3> go

1> create database SEC on SEC_data_001='100M' log on SEC_log_001='50M'

2> go

CREATE DATABASE: allocating 25600 logical pages (100.0 megabytes) on disk 'SEC_data_001' (25600 logical pages requested).

CREATE DATABASE: allocating 12800 logical pages (50.0 megabytes) on disk 'SEC_log_001' (12800 logical pages requested).

Database 'SEC' is now online.

 


To check the database status, use the below command

1> sp_helpdb SEC

2> go


 

On Windows:

1> use master

2> go

1> disk init

2> name='SEC_data_001' ,physname='E:\sybase\SEC\data\SEC_data_001.dat' ,size='100M'

3> go

1> disk init

2> name='SEC_log_001' ,physname='E:\sybase\SEC\log\SEC_log_001.dat' ,size='50M'

3> go

1> create database SEC on SEC_data_001='100M' log on SEC_log_001='50M'

2> go

CREATE DATABASE: allocating 25600 logical pages (100.0 megabytes) on disk 'SEC_data_001' (25600 logical pages requested).

CREATE DATABASE: allocating 12800 logical pages (50.0 megabytes) on disk 'SEC_log_001' (12800 logical pages requested).

Database 'SEC' is now online.


Sybase history

Sybase  is a computer software company that develops and sells database management system (DBMS) and middleware products. The company was fo...