CREATE DBSPACE Statement

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

Quick Links:

Go to Parameters

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

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-specificationIQ STORE ] iq-dbspace-opts

Syntax 3 – Use for RLV dbspaces.

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

Syntax 4 – Use for cache dbspace dbspaces.

CREATE DBSPACE dbspace-name USING FILE file-specification
     IQ CACHE STORE 


file-specification - (back to Syntax 2) or (back to Syntax 3)single-path-specnew-file-spec  [, ...] }

single-path-spec - (back to file-specification)
   'file-path' |  iq-file-opts

new-file-spec - (back to file-specification)
   FILE logical-file-name 'file-path' iq-file-opts

iq-file-opts - (back to new-file-spec)
   [ [ SIZE  ] file-size ] 
   …[ KB | MB  | GB  | TB ] ] 
   [ RESERVE  size  
   …[ KB | MB  | GB  | TB ] ]

iq-dbspace-opts - (back to Syntax 2)STRIPING ] {ON | OFF} ] …[ STRIPESIZEKB sizeKB ]

Parameters

(back to top)

Examples

(back to top)

Usage

(back to top)

CREATE DBSPACE creates a new dbspace for the IQ main store, cache dbspace, 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 only one cache dbspace on a simplex or multiplex node. Attempting to create a second cache dbspace results in an error.

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

(back to top)

  • SQL—Vendor extension to ISO/ANSI SQL grammar.
  • SAP Sybase Database product—Not supported by Adaptive Server.

Permissions

(back to top)

Requires the MANAGE ANY DBSPACE system privilege.

Related reference
CREATE DATABASE Statement
DROP Statement