Avatar of Jay Redd
Jay Redd
 asked on

Dynamically Growing Sybase Database

I am building a little installation/packaging script that deploys various database schema items and procedures. Right now, I just use this to make the database:

CREATE DATABASE dbname
GO

However,
when i point my little package at my larger databases, they quickly fill up the allotted space.

I am not clear how to create a database that has space to grow on sybase....is there some sort of parameter CREATE DATABASE parameter that allows it room to grow, or do I have to supply a specific size per database?
Sybase Database

Avatar of undefined
Last Comment
Joe Woodhouse

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Joe Woodhouse

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jay Redd

ASKER
Thanks joe,
I ended up doing something like this (for the benefit of those who are looking, i had a hard time figuring out the device part..)

-- Data Device
disk init
name              = 'do02_data',
physname        = 'C:\sybase\data\do02data.dat',
size        = '15G',
directio    = true,
skip_alloc  = true
go

-- Log Device
disk init
name              = 'do02_log',
physname        = 'C:\sybase\data\do02log.dat',
size        = '7G',
directio    = true,
skip_alloc  = true
CREATE DATABASE do02 on do02_data = '15G' LOG ON  do02_log = '7G'             -- will take some time
GO
sp_dboption do02, 'select into/bulkcopy', true
GO


The  'select into/bulkcopy' was also needed if you're going to use BCP right afterwards.

I just put instructions in my package for the end user to modify these values as needed.
Joe Woodhouse

Ooh, you went gourmet and included some of the optional arguments too. Nicely done. :)
Your help has saved me hundreds of hours of internet surfing.
fblack61