Kbase 13945: How to create a database in Sybase
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
How to create a database in Sybase
If you need to do testing and you need to create a db in
Sybase this should help:
Run Sybass's interactive sql tool, isql. To run this you
must have DSQUERY and SYBASE environment variables set.
DSQUERY tells Sybase what SQL Server you are connecting to
and SYBASE is the install directory for Sybase. Put $SYBASE
and $SYBASE/install in your path.
to run isql type
isql -U user -P password (typical user is the sa)
To create a database, you need to create disks to put it on.
You need to use the Sybase master db to do the following so
issue the following in isql
user master
go
disk init
name = "device name",
physname = "physical name",
vdevdo = virtual device number,
size=number of pages
(where device name is the SQL server reference that will be
used in the create database command. This can be whatever
you like. physname is the name of the raw partition or disk
file on the UNIX system. vdevno is any number from 1 through
max configured -1 (not to exceed 255) These numbers can NOT
be reused, so be sure before you grab one. Size is in 2K
pages so specify sizes ion multiples of 512 pages.
ie: disk_init
name="data_dev1",
physname="/dev/rsd1",
vdevno=99,
size=92160
go
Create 2 devices (one for your db and one for your log file.
The Sybase log file is where transaction information gets
written).
Now you can create the database.
create database dbname
[on db_device [=size]
[,db_device [=size]...]
[log on db_device = [size]]...]
ie:
create database mysyb on data_dev1=5 log on data_dev2=2
go
Progress Software Technical Support Note # 13945