Collection Contents Index Using additional dbspaces Next PDF

SQL Anywhere® Server - Database Administration  > Working with Database Files  > Using additional dbspaces

Creating a dbspace


You create a new database file, or dbspace, either from Sybase Central, or using the CREATE DBSPACE statement. The database file for a new dbspace may be on the same disk drive as the main file or on another disk drive. You must have DBA authority to create dbspaces.

For each database, you can create up to twelve dbspaces in addition to the main dbspace. You can specify the dbspace in which an object is stored by setting the default_dbspace database option.

Placing tables in dbspaces

A newly-created dbspace is empty. When you create a new table you can place it in a specific dbspace with an IN clause in the CREATE TABLE statement or set the default_dbspace option before creating the table. If you don't specify an IN clause, and don't change the setting of the default_dbspace option, the table appears in the main dbspace.

Each table is entirely contained in the dbspace it is created in. By default, indexes appear in the same dbspace as their table, but you can place them in a separate dbspace by supplying an IN clause as part of the CREATE INDEX statement.

To create a dbspace (Sybase Central)
  1. Open the Dbspaces folder for that database.

  2. From the File menu, choose New > Dbspace.

    The Create Dbspace wizard appears.

  3. Follow the instructions in the wizard.

    The new dbspace appears in the Dbspaces folder.

To create a dbspace (SQL)