Thursday, 25 December 2014

Creating SAP ASE Database

To create a database in SAP ASE there are few steps to follow :

1. Device Initialization    
2. Database creation

Device Initialization :

In this step we are creating logical devices to store database and its logs.

Log Device:

1> disk init
2> name = 'sony_log_dev_01',
3> physname = 'C:\sybase_ase1503\data\sony_log_dev_01.dat',
4> size = '300M'
5> go

Data Device:

1> disk init
2> name = 'sony_data_dev_01',
3> physname = 'C:\sybase_ase1503\data\sony_data_dev_01.dat',
4> size = '500M'
5> go

Database creation :

1> create database sony
2> on sony_data_dev_01 = '400M'
3> log on sony_log_dev_01 = '200M'
4> go

Note: Above given device names just for understanding written like that, else you can put any other names as well as per your understanding. But for the best practices keep following the naming conventions.

Output:

CREATE DATABASE: allocating 51200 logical pages (400.0 megabytes) on disk 'sony_data_dev_01' (51200 logical pages requested).
CREATE DATABASE: allocating 25600 logical pages (200.0 megabytes) on disk 'sony_log_dev_01' (25600 logical pages requested).
Database 'sony' is now online.
Execution time: 15.213 seconds



1> commit
2> go
1> checkpoint
2> go

1> sp_helpdb sony
2> go

Output:





Keep updating me with your suggestions and queries in the comments below...everything will be appreciated..Thanks...!!