16 5 1 Configuration Notes Creating Tables and Indexes

LANSA Technical

16.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.

Note: No syntax checking will be done. If the appended information is bad syntax, the DBMS call will fail and an error code will be returned.

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

Note: Primary Key Indexes will only use the X_RUNSQL_CREATE_INDEX value if the DBMS entry in x_dbmenv.dat contains the following settings:

SUPPORTS_PRIMARY_KEY=NO

CONVERT_PRIMARY_KEY_TO_INDEX=YES