Create Dbspace Statement - Sybase Adaptive Server Anywhere Reference

Table of Contents

Advertisement

CREATE DBSPACE statement

Function
Syntax
Permissions
Side effects
See also
Description
Parameters
Standards and
compatibility
Example
Use this statement to define a new database space and create the associated
database file.
CREATE DBSPACE dbspace-name
AS filename
Must have DBA authority.
Automatic commit. Automatic checkpoint.
"DROP statement" on page 505
"Using additional dbspaces" on page 788 of the book ASA User's Guide
The CREATE DBSPACE statement creates a new database file. When a
database is created, it is composed of one file. All tables and indexes created
are placed in that file. CREATE DBSPACE adds a new file to the database.
This file can be on a different disk drive than the main file, which means that
the database can be larger than one physical device.
For each database, there is a limit of twelve dbspaces, including the main
file.
Each table is contained entirely within one database file. The IN clause of the
CREATE TABLE statement specifies the dbspace into which a table is
placed. Tables are put into the main database file by default.
dbspace-name
An internal name for the database file. The filename
parameter is the actual name of the database file, with a path where
necessary.
filename
A filename without an explicit directory is created in the same
directory as the main database file. Any relative directory is relative to the
main database file. The filename is relative to the database server. When you
are using the database server for NetWare, the filename should use a volume
name (not a drive letter) when an absolute directory is specified.
Vendor extension.
SQL/92
Not supported by Adaptive Server Enterprise.
Sybase
Create a dbspace called
indexes.
CREATE DBSPACE library
AS 'e:\\dbfiles\\library.db';
Chapter 9 SQL Statements
library
to hold the
LibraryBooks
table and its
431

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents