cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

create database/disk init

0 Likes
2,335

Hi experts,

I have a question regarding creation of a new data base in ASE Server 15.5

Should i first create the disk allocation fand then launch

-create database on xxxx.dat

or the command

-create database creates automatically the disk allocation?

I mean:

First option:

disk init

name = "user_disk",

physname = "/usr/u/sybase/data/userfile1.dat",

size = 5120,

Create database myDB

on "user_disk" ='size'

log on "user_disk"='size

Second option execute only create database without disk init:

Create database myDB

on "user_disk" ='size'

log on "user_disk"='size


Thank you

View Entire Topic
hans-juergen_schwindke
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

first you have to create two devices with disk init. One device is for data and the other for the transaction log. If they are in place, you can create a database on them. Here is an example:

disk init name = 'cistest_data2',

physname = '/var/sybase/devices/cistest_data2',

size  = '1024M'

go

disk init name = 'cistest_log2',

physname = '/var/sybase/devices/cistest_log2',

size  = '512M'

go

create database cistest_1503b on cistest_data2 = 1024 log on cistest_log2 = 512

go

Please note that the size parameter in disk init is in pages, but you can specify others as you can see in my example.

The sizes in create database are MB by default.

If your device is not big enough it can be extended using "disk resize" command. The new / additional space must be added to the database by using the alter database command.

You can use

sp_helpdevice [devicename]

to check the devices and

sp_helpdb [dbname]

to check databases.

Best regards,

Juergen