Assigning Space and Devices to Databases

SAP ASE allocates storage space to databases when a user executes the create database or alter database command.

create database can specify one or more database devices, along with the amount of space on each that is to be allocated to the new database.

Warning!   Unless you are creating a small or noncritical database, always place the log on a separate database device. Follow the instructions in “Placing the Transaction Log on a Separate Device” on page 150 to create production databases.

If you use the default keyword, or if you omit the on clause, SAP ASE puts the database on one or more of the default database devices specified in master..sysdevices. See System Administration Guide: Volume 1 > Initializing Database Devices.

To specify a size (4MB in the following example) for a database that is to be stored in a default location, use:
create database newpubs
on default = "4M"

To place the database on specific database devices, include the names of the database devices in the command. You can request that a database be stored on more than one database device, with a different amount of space on each. All the database devices named in create database must be listed in sysdevices (that is, they must have been initialized with disk init). See System Administration Guide: Volume 1 > Initializing Database Devices

The following statement creates the newdb database and allocates 3MB on mydata and 2MB on newdata. The database and transaction log are not separated:
create database newdb
on mydata = "3M", newdata = "2M"

If the amount of space you request on a specific database device is unavailable, SAP ASE creates the database with as much space as possible on each device and displays a message informing you how much space it has allocated on each database device. If there is less than the minimum space necessary for a database on the specified database device, create database fails.

If you create (or alter) a database on a UNIX device file that does not use the dsync setting, SAP ASE displays an error message in the error log file, for example:
Warning: The database 'newdb' is using an unsafe virtual device 'mydata'. The recovery of this database can not be guaranteed.