EasyManua.ls Logo

Sybase Adaptive Server Anywhere - ALTER DBSPACE Statement

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
385
ALTER DBSPACE statement
Use this statement to modify the characteristics of a DBSPACE. To pre-
allocate space for a DBSPACE or for the transaction log.
ALTER DBSPACE {
dbspace-name
| TRANSLOG }
ADD
number
| RENAME
filename-string
Must have DBA authority. Must be the only connection to the database.
Automatic commit.
"CREATE DBSPACE statement" on page 431
"Working with databases" on page 115 of the book ASA User’s Guide
Each database is held in one or more files. A dbspace is a logical name
associated with each database file. ALTER DBSPACE modifies the main
dbspace (also called the root file) or an additional dbspace. The dbspace
names for a database are held in the SYSFILE system table. The main
database file has a dbspace name of SYSTEM.
When a multi-file database is started, the start line or ODBC data source
description tells Adaptive Server Anywhere where to find the main database
file. The main database file (which has the dbspace name SYSTEM) holds
the system tables. Adaptive Server Anywhere looks in these system tables to
find the location of the other dbspaces, and Adaptive Server Anywhere then
opens each of the other dbspaces.
ADD clause An ALTER DBSPACE with the ADD clause preallocates
disk space for a dbspace. It extends the size of the corresponding database
file by the number pages. The page size of a database is fixed when the
database is created.
If space is not preallocated, database files are extended by 32 pages at a time
when the space is needed. Preallocating space can improve performance for
loading large amounts of data and also serves to keep the database files more
contiguous within the file system.
TRANSLOG clause You supply the special dbspace name TRANSLOG,
to preallocate disk space for the transaction log. Preallocation improves
performance if the transaction log is expected to grow quickly. You may
want to use this feature if, for example, you are handling many binary large
objects (blobs), such as bitmaps.
RENAME clause If you rename or move a database file other than the
main file to a different directory or device, you can use ALTER DBSPACE
with the RENAME clause to ensure that Adaptive Server Anywhere finds the
new file when the database is started.
Function
Syntax
Permissions
Side effects
See also
Description
Parameters

Table of Contents

Related product manuals