on ā2016 May 06 11:59 AM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.