Creating a Single-file Database
Go Up to Using CREATE DATABASE
Although there are many optional parameters, CREATE DATABASE
requires only one parameter, <filespec>, which is the new database file specification. The file specification contains the device name, path name, and database name.
By default, a database is created as a single file, called the primary file. The following example creates a single-file database, named employee.ib
, in the current directory.
CREATE DATABASE 'employee.ib';
For more information about file naming conventions, see the Operations Guide.
Specifying file size for a single-file database
You can optionally specify a file length, in pages, for the primary file. For example, the following statement creates a database that is stored in one 10,000-page- long file:
CREATE DATABASE 'employee.ib' LENGTH 10000;
If the database grows larger than the specified file length, InterBase extends the primary file beyond the LENGTH
limit until the disk space runs out. To avoid this, you can store a database in more than one file, called a secondary file.
- Note: Use
LENGTH
for the primary file only if defining a secondary file in the same statement.