ALTER DATAFILE
Enlarges
the size of a data file.
SYNTAX

| file_name |
Name
of the logical file to enlarge. |
| number |
Number
of pages to add. |
DESCRIPTION
The ALTER
DATAFILE command enlarges the size of a data or BLOB file by adding a
specified number of pages. Only users with SYSADM or DBA user privileges
can execute the ALTER DATAFILE command.
Files are
physical units of storage that contain the data inserted into the database.
Files themselves are managed by the operating system, while data in the
files is managed by the DBMS. DBMaker uses three types of files: data
files, BLOB files, and journal files.
Journal
files are special files that provide a real-time, historical record of
all changes made to a database and the status of each change. This allows
the database to undo changes made by a transaction that fails, or redo
changes made successfully but not written to disk after a database crashes.
Journal files are used only by the database management system, and are
not used to store user data.
Data files
and BLOB files are used to store user and system data. Although they have
similar characteristics, DBMaker manages these two file types in different
ways to improve performance. Data files store table and index data, while
BLOB files store only binary large objects.
To ensure
data independence within the database, operating system files cannot be
referenced directly within a database. To work around this, each database
file has two names: a physical file name and a logical file name. The
physical file name is the name used by the operating system, while the
logical file name is the name used by the database. These two file names
are related by an entry in the dmconfig.ini configuration file.
When using
the ALTER DATAFILE command, you must specify the name of the logical file.
You can add from 1 to 524285 pages to a file, providing the total number
of pages in the file does not exceed 524287, the total size of the file
or all files in the same tablespace does not exceed 2 GB, and there is
sufficient disk space.
EXAMPLE
The following
is an excerpt from a dmconfig.ini configuration file showing entries for
four database files with their logical and physical file names. The logical
file names are on the left and the physical file names are on the right
|
customer_data
= d:\dbmaker\tutorial\database\custdata.db 500
customer_blob = d:\dbmaker\tutorial\database\custblob.bb 1000
|
The following
example adds 1000 pages to the customer_data file.
ALTER
DATAFILE customer_data ADD 1000 PAGES |
Now the same
excerpt from the dmconfig.ini configuration file will show the increased
file size for the customer_data file.
|
customer_data
= d:\dbmaker\tutorial\database\custdata.db 1500
customer_blob = d:\dbmaker\tutorial\database\custblob.bb 1000
|
RELATED COMMANDS
<
ADD TO GROUP | Contents
| ALTER PASSWORD >
|