#QSCOMMAND EXPORT TO '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_INSTANCE_IDS.109.1\SM_INSTANCE_IDS.ixf'
  OF IXF
  SELECT * FROM QUEST.SM_INSTANCE_IDS;

#SYNC 10;

DROP TABLE QUEST.SM_INSTANCE_IDS;

#SYNC 20;

CREATE TABLE QUEST.SM_INSTANCE_IDS
 (INSTANCE_NAME  VARCHAR(8)      NOT NULL,
  INSTANCE_DBMS  SMALLINT        NOT NULL,
  INSTANCE_ID    INTEGER         NOT NULL
 )
  DATA CAPTURE NONE
  IN YOUR_TABLESPACE_HERE;

#SYNC 30;

ALTER TABLE QUEST.SM_INSTANCE_IDS
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

#SYNC 40;

COMMENT ON TABLE QUEST.SM_INSTANCE_IDS
  IS 'SMUDB REPO V02.01A';

#SYNC 50;

--GRANT CONTROL ON TABLE QUEST.SM_INSTANCE_IDS TO USER xxxx;

#SYNC 60;

#QSCOMMAND IMPORT FROM '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_INSTANCE_IDS.109.1\SM_INSTANCE_IDS.ixf'
  OF IXF
  MODIFIED BY COMPOUND=5
              NOCHECKLENGTHS
  COMMITCOUNT 1000
--RESTARTCOUNT xxx
  INSERT INTO QUEST.SM_INSTANCE_IDS;

#SYNC 70;

ALTER TABLE QUEST.SM_INSTANCE_IDS
  ADD CONSTRAINT SQL010424144841920 UNIQUE
   (INSTANCE_NAME,
    INSTANCE_DBMS
   );

#SYNC 80;

RUNSTATS ON TABLE QUEST.SM_INSTANCE_IDS
  AND INDEXES ALL 
  SHRLEVEL REFERENCE;

#SYNC 90;
#QSCOMMAND EXPORT TO '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_TABLESPACE_IDS.111.1\SM_TABLESPACE_IDS.ixf'
  OF IXF
  SELECT * FROM QUEST.SM_TABLESPACE_IDS;

#SYNC 100;

DROP TABLE QUEST.SM_TABLESPACE_IDS;

#SYNC 110;

CREATE TABLE QUEST.SM_TABLESPACE_IDS
 (NAME  VARCHAR(18)     NOT NULL,
  ID    INTEGER         NOT NULL
 )
  DATA CAPTURE NONE
  IN YOUR_TABLESPACE_HERE;

#SYNC 120;

ALTER TABLE QUEST.SM_TABLESPACE_IDS
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

#SYNC 130;

COMMENT ON TABLE QUEST.SM_TABLESPACE_IDS
  IS 'SMUDB REPO V02.01A';

#SYNC 140;

--GRANT CONTROL ON TABLE QUEST.SM_TABLESPACE_IDS TO USER xxxx;

#SYNC 150;

#QSCOMMAND IMPORT FROM '%DATA_PATH%\DBNAME.QUEST.SM_TABLESPACE_IDS.111.1\SM_TABLESPACE_IDS.ixf'
  OF IXF
  MODIFIED BY COMPOUND=5
              NOCHECKLENGTHS
  COMMITCOUNT 1000
--RESTARTCOUNT xxx
  INSERT INTO QUEST.SM_TABLESPACE_IDS;

#SYNC 160;

ALTER TABLE QUEST.SM_TABLESPACE_IDS
  ADD CONSTRAINT SQL010424144842870 UNIQUE
   (NAME
   );

#SYNC 170;

RUNSTATS ON TABLE QUEST.SM_TABLESPACE_IDS
  AND INDEXES ALL 
  SHRLEVEL REFERENCE;

#SYNC 180;
#QSCOMMAND EXPORT TO '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_TABLE_IDS.113.1\SM_TABLE_IDS.ixf'
  OF IXF
  SELECT * FROM QUEST.SM_TABLE_IDS;

#SYNC 190;

DROP TABLE QUEST.SM_TABLE_IDS;

#SYNC 200;

CREATE TABLE QUEST.SM_TABLE_IDS
 (SCHEMA  VARCHAR(128)    NOT NULL,
  NAME    VARCHAR(128)    NOT NULL,
  ID      INTEGER         NOT NULL
 )
  DATA CAPTURE NONE
  IN YOUR_TABLESPACE_HERE;

#SYNC 210;

ALTER TABLE QUEST.SM_TABLE_IDS
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

#SYNC 220;

COMMENT ON TABLE QUEST.SM_TABLE_IDS
  IS 'SMUDB REPO V02.01A';

#SYNC 230;

--GRANT CONTROL ON TABLE QUEST.SM_TABLE_IDS TO USER xxxx;

#SYNC 240;

#QSCOMMAND IMPORT FROM '%DATA_PATH%\DBNAME.QUEST.SM_TABLE_IDS.113.1\SM_TABLE_IDS.ixf'
  OF IXF
  MODIFIED BY COMPOUND=5
              NOCHECKLENGTHS
  COMMITCOUNT 1000
--RESTARTCOUNT xxx
  INSERT INTO QUEST.SM_TABLE_IDS;

#SYNC 250;

ALTER TABLE QUEST.SM_TABLE_IDS
  ADD CONSTRAINT SQL010424144843700 UNIQUE
   (SCHEMA,
    NAME
   );

#SYNC 260;

RUNSTATS ON TABLE QUEST.SM_TABLE_IDS
  AND INDEXES ALL 
  SHRLEVEL REFERENCE;

#SYNC 270;
#QSCOMMAND EXPORT TO '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_INDEX_IDS.114.1\SM_INDEX_IDS.ixf'
  OF IXF
  SELECT * FROM QUEST.SM_INDEX_IDS;

#SYNC 280;

DROP TABLE QUEST.SM_INDEX_IDS;

#SYNC 290;

CREATE TABLE QUEST.SM_INDEX_IDS
 (SCHEMA  VARCHAR(128)    NOT NULL,
  NAME    VARCHAR(128)    NOT NULL,
  ID      INTEGER         NOT NULL
 )
  DATA CAPTURE NONE
  IN YOUR_TABLESPACE_HERE;

#SYNC 300;

ALTER TABLE QUEST.SM_INDEX_IDS
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

#SYNC 310;

COMMENT ON TABLE QUEST.SM_INDEX_IDS
  IS 'SMUDB REPO V02.01A';

#SYNC 320;

--GRANT CONTROL ON TABLE QUEST.SM_INDEX_IDS TO USER xxxx;

#SYNC 330;

#QSCOMMAND IMPORT FROM '%DATA_PATH%\DBNAME.QUEST.SM_INDEX_IDS.114.1\SM_INDEX_IDS.ixf'
  OF IXF
  MODIFIED BY COMPOUND=5
              NOCHECKLENGTHS
  COMMITCOUNT 1000
--RESTARTCOUNT xxx
  INSERT INTO QUEST.SM_INDEX_IDS;

#SYNC 340;

ALTER TABLE QUEST.SM_INDEX_IDS
  ADD CONSTRAINT SQL010424144844540 UNIQUE
   (SCHEMA,
    NAME
   );

#SYNC 350;

RUNSTATS ON TABLE QUEST.SM_INDEX_IDS
  AND INDEXES ALL 
  SHRLEVEL REFERENCE;

#SYNC 360;

#QSCOMMAND EXPORT TO '%DATA_PATH%\YOUR_DATABASE_HERE.QUEST.SM_DB_IDS.124.1\SM_DB_IDS.ixf'
  OF IXF
  SELECT * FROM QUEST.SM_DB_IDS;

#SYNC 370;

DROP TABLE QUEST.SM_DB_IDS;

#SYNC 380;

CREATE TABLE QUEST.SM_DB_IDS
 (NAME  VARCHAR(8)      NOT NULL,
  ID    INTEGER         NOT NULL
 )
  DATA CAPTURE NONE
  IN YOUR_TABLESPACE_HERE;

#SYNC 390;

ALTER TABLE QUEST.SM_DB_IDS
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

#SYNC 400;

COMMENT ON TABLE QUEST.SM_DB_IDS
  IS 'SMUDB REPO V02.01A';

#SYNC 410;

--GRANT CONTROL ON TABLE QUEST.SM_DB_IDS TO USER xxxx;

#SYNC 420;

#QSCOMMAND IMPORT FROM '%DATA_PATH%\BASEBALL.QUEST.SM_DB_IDS.124.1\SM_DB_IDS.ixf'
  OF IXF
  MODIFIED BY COMPOUND=5
              NOCHECKLENGTHS
  COMMITCOUNT 1000
--RESTARTCOUNT xxx
  INSERT INTO QUEST.SM_DB_IDS;

#SYNC 430;

ALTER TABLE QUEST.SM_DB_IDS
  ADD CONSTRAINT SQL020128141634160 UNIQUE
   (NAME
   );

#SYNC 440;

RUNSTATS ON TABLE QUEST.SM_DB_IDS
  AND INDEXES ALL 
  SHRLEVEL REFERENCE;

#SYNC 450;
