17.5.1 Configuration Notes - Creating Tables and Indexes
You may also configure RUNSQL using the environment variables X_RUNSQL_CREATE_TABLE and X_RUNSQL_CREATE_INDEX. These variables allow DBMS-specific strings to be appended to the "create" commands before RUNSQL executes them.
The following example shows how to use this feature to separate tables and indexes into different storage areas.
For SQLANYWHERE on Windows:
SET X_RUNSQL_CREATE_TABLE="IN DATA"
SET X_RUNSQL_CREATE_INDEX="IN IDX"
(DATA and IDX are SQL/Anywhere dbspaces created earlier with the CREATE DBSPACE command.)
For the example table PSLMST, RUNSQL will create the table PSLMST with the following statement:
create table PSLMST (...column list...) IN DATA
and the relative record number index with the following statement:
create unique index PSLMST_R on PSLMST (x_rrno) IN IDX
For ORACLE on LINUX:
X_RUNSQL_CREATE_TABLE="tablespace DATA"; export X_RUNSQL_CREATE_TABLE
X_RUNSQL_CREATE_INDEX="tablespace IDX"; export X_RUNSQL_CREATE_INDEX
(DATA and IDX are Oracle tablespaces created earlier with the CREATE TABLESPACE command.)
For the example table PSLMST, RUNSQL will create the table PSLMST with the following statement:
create table PSLMST (...column list...) tablespace DATA
and the relative record number index with the following statement:
create unique index PSLMST_R on PSLMST (x_rrno) tablespace IDX
SUPPORTS_PRIMARY_KEY=NO
CONVERT_PRIMARY_KEY_TO_INDEX=YES