CREATE DBSPACE Statement

Creates a new dbspace and the associated dbfiles for the IQ main store, catalog store, or RLV store.

Syntax

Syntax 1 – Use for catalog store dbspaces only (SQL Anywhere (SA) dbspaces).

CREATE DBSPACE dbspace-name AS file-path CATALOG STORE

Syntax 2 – Use for IQ main store dbspaces.

CREATE DBSPACE dbspace-name USING file-specification 
   [ IQ STORE ] iq-dbspace-opts

Syntax 3 – Use for RLV dbspaces.

CREATE DBSPACE dbspace-name USING file-specification 
    IQ RLV STORE 

file-specification:
   { single-path-spec   |  new-file-spec  [, ...] }

single-path-spec:
   'file-path'  |  iq-file-opts

new-file-spec:
   FILE logical-file-name 'file-path' iq-file-opts

iq-file-opts:
   [ [ SIZE  ] file-size ] 
   …[ KB | MB  | GB  | TB ] ] 
   [ RESERVE  size  
   …[ KB | MB  | GB  | TB ] ]

iq-dbspace-opts:
   [ STRIPING ] {ON | OFF} ] …[ STRIPESIZEKB sizeKB ]

Parameters

Examples

Usage

CREATE DBSPACE creates a new dbspace for the IQ main store, catalog store, or RLV store. The dbspace you add can be on a different disk device than the initial dbspace, allowing you to create stores that are larger than one physical device.

Syntax 1 creates a dbspace for the catalog store, where both dbspace and dbfile have the same logical name. Each dbspace in the catalog store has a single file.

The dbspace name and dbfile names are always case-insensitive. The physical file paths have the case sensitivity of the operating system if the database is CASE RESPECT, and are case-insensitive if the database is CASE IGNORE.

You cannot create a dbspace for an IQ temporary store. A single temporary dbspace, IQ_SYSTEM_TEMP, is created when you create a new database or upgrade one that was created in a version earlier than SAP Sybase IQ 15.3. You can add additional files to the IQ_SYSTEM_TEMP dbspace using the ALTER DBSPACE ADD FILE syntax.

Note: Creating a RLV dbspace containing a minimum of one file is a prerequisite for RLV storage. Before enabling RLV storage on a simplex server, check that the RLV dbspace exists.
You can create a unique path in any of these ways:
  • Specify a different extension for each file (for example, mydb.iq)

  • Specify a different file name (for example, mydb2.iq)

  • Specify a different path name (for example, /iqfiles/main/iq) or different raw partitions

Warning!   On UNIX platforms, to maintain database consistency, specify file names that are links to different files. SAP Sybase IQ cannot detect the target where linked files point. Even if the file names in the command differ, make sure they do not point to the same operating system file.
Side effects:
  • Automatic commit

  • Automatic checkpoint.

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

Requires the MANAGE ANY DBSPACE system privilege.

Related reference
CREATE DATABASE Statement
DROP Statement