Creates a new dbspace and the associated dbfiles for the IQ main store, cache dbspace, catalog store, or RLV store.
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
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-spec | new-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 ]
When RESERVE is specified, the database uses more space for internal (free list) structures. If reserve size is too large, the space needed for the internal structures can be larger than the specified size, which results in an error.
For raw partitions, do not explicitly specify SIZE. SAP Sybase IQ automatically sets this parameter to the maximum raw partition size, and returns an error if you attempt to specify another size.
If you do not specify striping or stripe size, the default values of the options DEFAULT_DISK_STRIPING and DEFAULT_KB_PER_STRIPE apply.
CREATE DBSPACE DspHist USING FILE FileHist1 '/History1/data/file1' SIZE 1000 RESERVE 500, FILE FileHist2 '/History1/data/file2' SIZE 1000 RESERVE 500;
CREATE DBSPACE DspCat2 AS 'catalog_file2' CATALOG STORE;
CREATE DBSPACE EmpStore1 USING FILE EmpStore1 'EmpStore1.IQ' SIZE 8 MB IQ STORE;
CREATE DBSPACE EmpStore1 USING FILE EmpStore1 'EmpStore1.IQ' 8 IQ STORE;
CREATE DBSPACE EmpStore1 USING FILE EmpStore1 'EmpStore1.IQ' 8;
CREATE DBSPACE d1 USING FILE f1 'f1.iq' SIZE 1000 IQ RLV STORE;
CREATE DBSPACE myDAS USING FILE iqdas1 'iqdas1.iq' SIZE 200 GB IQ CACHE STORE
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.
You can create only one cache dbspace on a simplex or multiplex node. Attempting to create a second cache dbspace results in an error.