Teradata Query Scheduler Server does not start

Tools
Teradata Employee

Teradata Query Scheduler Server does not start

Hi,

I want to use a laptop (running Windows XP) for running the SERVER and CLIENT part of the Teradata Query Scheduler. Installation of the tools went fine. We ran the bteg script which should update the tdwm tables. (See log below).

We get the following error when I try to start the server with Teradata Query Scheduler Operations tool.

16:35:18|INIT |002636|SchedServer:Main  |ServerStartup     |00000|00000

16:35:19|COMM |007172|SchedListener:main|startup           |00000|00000

16:35:19|COMM |007172|SchedListener     |preBind           |00000|00000

Host:[E0206995] Addr:[10.60.82.180] Port:30 SockId=584

16:35:19|COMM |007172|SchedListener     |preBind           |00000|00000

addrlen=16, family=2 (PF_INET), port=30

16:35:32|INIT |002636|GetDbInfo         |LargeDecimal      |00000|00001

16:35:32|INIT |002636|GetDbInfo         |VersMismatch      |00000|00000

Please run the current version of Teradata Manager Database Setup to update the TDWM database. SCHED_VERSION: 60migrate

16:35:32|INIT |002636|SchedServer:Init  |ServerStartupFail |00000|00000

Abort Server: database access error

16:35:33|COMM |007172|SchedListener:main|shutdown          |00000|00000

This is the setup:

Teradata database version 13.

Teradata Tools and Utilities version 13.10. (Teradata Query Scheduler version 13.10)

Does anyone have an idea what I can / should do?

This is the log from the run bteq script:

BTEQ 13.00.00.11 Fri Apr 05 09:26:55 2013

+---------+---------+---------+---------+---------+---------+---------+----

/************************************************************************

*  tqssetup.bteq

*

*  Copyright 2008-2010 by Teradata Corporation

*  All Rights Reserved.

*

*  Version:

*   Teradata Query Scheduler 13.10

*

*

*  Purpose:

*   Database setup for Teradata Query Scheduler.

*

*

*  Usage notes:

*   This script can be used on Teradata V2R6.x and later databases.

*

*   Before using this script replace the .logon statement as appropriate

*   for your site.

*

*   Stop all Teradata Query Scheduler applications and servers before

*   running the script.

*

*   Use bteq to submit this script to each Teradata Database on which

*   Teradata Query Scheduler 13.10 is to run.

*

*   After this script has completed, if you are upgrading from the

*   Teradata Query Scheduler 6.0 release, please run the Teradata Query

*   Scheduler 13.10 Migration utility (see the Teradata Query Scheduler

*   Administrator Guide).

*    - This setup script creates empty scheduling tables for Teradata

*      Query Scheduler 13.10 and renames the old 6.0 tables (if they

*      exist).

*    - The Teradata Query Scheduler Migration utility migrates data from

*      the old tables to the 13.10 tables.

*    - Do NOT run the Migration utility if you are upgrading from any of

*      the following versions: 13.0, 12.0, 6.2 or 6.1.

************************************************************************/

.LOGOFF

+---------+---------+---------+---------+---------+---------+---------+----

.SET SESSION TRANS BTET

+---------+---------+---------+---------+---------+---------+---------+----

*** Replace the following .logon statement

.LOGON 195.233.39.164/dbc,

 *** Logon successfully completed.

 *** Teradata Database Release is 13.00.01.24                  

 *** Teradata Database Version is 13.00.01.36                    

 *** Transaction Semantics are BTET.

 *** Character Set Name is 'ASCII'.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

SELECT USERNAME FROM dbc.Users WHERE Username ='tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

UserName

------------------------------

tdwm

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO TDWMEXISTS

.GOTO TDWMEXISTS

+---------+---------+---------+---------+---------+---------+---------+----

CREATE USER tdwm FROM dbc

AS PERMANENT = 100E6, SPOOL = 2E9, TEMPORARY = 2E9,

   ACCOUNT = '$H-DBC-MANAGER',

   PASSWORD = tdwmadmin,

   DEFAULT CHARACTER SET UNICODE,

   FALLBACK PROTECTION;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL TDWMEXISTS

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'GlobalParams' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO GLOBALPARAMSEXISTS

.GOTO GLOBALPARAMSEXISTS

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE tdwm.GlobalParams

(

    ParamName           VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC

 NOT NULL,

    ParamValue          VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC

 NOT NULL

)

UNIQUE PRIMARY INDEX (ParamName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL GLOBALPARAMSEXISTS

+---------+---------+---------+---------+---------+---------+---------+----

SELECT ParamValue FROM tdwm.GlobalParams WHERE ParamName = 'SCHED_VERSION';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ParamValue

------------------------------

6100

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_SchedVersion

.GOTO AFTER_SchedVersion

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT INTO tdwm.GlobalParams (ParamName, ParamValue) VALUES ('SCHED_VERSIO

N', '0');

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_SchedVersion

+---------+---------+---------+---------+---------+---------+---------+----

SELECT ParamValue FROM tdwm.GlobalParams WHERE ParamName = 'SCHED_ENABLED';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ParamValue

------------------------------

NO

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_SchedEnabled

.GOTO AFTER_SchedEnabled

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT INTO tdwm.GlobalParams (ParamName, ParamValue) VALUES ('SCHED_ENABLE

D', 'YES');

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_SchedEnabled

+---------+---------+---------+---------+---------+---------+---------+----

DATABASE tdwm;

 *** New default database accepted.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO SET_GLOBVERS_R6

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '13000'

 WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO AFTER_GLOBVERS

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL SET_GLOBVERS_R6

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '6100'

 WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_GLOBVERS

+---------+---------+---------+---------+---------+---------+---------+----

/**

 ** SchedServers

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedServers' AND

DatabaseName = 'tdwm' AND ColumnName = 'SysName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDSERVERS

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedServers' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDSERVERS;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedServers AS tdwm.z60SchedServers;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDSERVERS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDSERVERS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedServers

(

 SysName   VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 ServerId  INTEGER NOT NULL,

 ServerState  INTEGER NOT NULL,

 PrimaryServer  INTEGER NOT NULL,

 LastRequestId  INTEGER NOT NULL,

 NetAddr   VARCHAR(128) NOT NULL,

 IpPort   INTEGER NOT NULL,

 Connections  INTEGER NOT NULL,

 LastActivityDate DATE,

 LastActivityTime INTEGER FORMAT '99:99:99' NOT NULL,

 LastUpdateDate  DATE,

 LastUpdateTime  INTEGER FORMAT '99:99:99' NOT NULL

)

UNIQUE PRIMARY INDEX (SysName);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedServers

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDSERVERS

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedServers

(

 SysName   VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 ServerId  INTEGER NOT NULL,

 ServerState  INTEGER NOT NULL,

 PrimaryServer  INTEGER NOT NULL,

 LastRequestId  INTEGER NOT NULL,

 NetAddr   VARCHAR(30) NOT NULL,

 IpPort   INTEGER NOT NULL,

 Connections  INTEGER NOT NULL,

 LastActivityDate DATE,

 LastActivityTime INTEGER FORMAT '99:99:99' NOT NULL,

 LastUpdateDate  DATE,

 LastUpdateTime  INTEGER FORMAT '99:99:99' NOT NULL

)

UNIQUE PRIMARY INDEX (SysName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedServers;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT TableName FROM DBC.Tables WHERE TableName = 'z60SchedServers' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

TableName

------------------------------

z60SchedServers

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDSERVERS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedServers' AND

DatabaseName = 'tdwm' AND ColumnName = 'SysName' AND CharType = 2;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO U130SchedServers

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

  .GOTO AFTERSCHEDSERVERS

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL U130SchedServers

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT SchedServers SELECT * FROM tdwm.z60SchedServers;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

  .IF errorcode <> 0 THEN .GOTO ERRSchedServers

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    DROP TABLE tdwm.z60SchedServers;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    .GOTO AFTERSCHEDSERVERS

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL ERRSchedServers

+---------+---------+---------+---------+---------+---------+---------+----

    UPDATE GlobalParams SET ParamValue = '130errServers'

     WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDSERVERS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 ** SchedRequests

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedRequests' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedRequests' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedRequests AS tdwm.z60SchedRequests;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedRequests

(

 RequestId  INTEGER NOT NULL,

 RequestName  VARCHAR(40) NOT CASESPECIFIC CHARACTER SET UNICODE,

 UserName  VARCHAR(128) NOT CASESPECIFIC CHARACTER SET UNICODE,

 UserDb   VARCHAR(128) NOT CASESPECIFIC CHARACTER SET UNICODE,

 AcctString  VARCHAR(128) NOT CASESPECIFIC CHARACTER SET UNICODE,

 RequestState  INTEGER NOT NULL,

 Frequency  INTEGER,

 DaysDates  INTEGER,

 StartDate  DATE,

 StartTime  INTEGER FORMAT '99:99:99',

 MaxDate   INTEGER,

 MaxTime   INTEGER FORMAT '99:99:99',

 MaxIsRel  INTEGER,

 LastSubmitDate  DATE,

 LastSubmitTime  INTEGER FORMAT '99:99:99',

 TheQueryBand  VARCHAR(2048) NOT CASESPECIFIC CHARACTER SET UNICODE

)

UNIQUE PRIMARY INDEX (RequestId);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedRequests

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDREQUESTS

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedRequests

(

 RequestId  INTEGER NOT NULL,

 RequestName  VARCHAR(40) NOT CASESPECIFIC CHARACTER SET UNICODE,

 UserName  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 UserDb   VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 AcctString  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 RequestState  INTEGER NOT NULL,

 Frequency  INTEGER,

 DaysDates  INTEGER,

 StartDate  DATE,

 StartTime  INTEGER FORMAT '99:99:99',

 MaxDate   INTEGER,

 MaxTime   INTEGER FORMAT '99:99:99',

 MaxIsRel  INTEGER,

 LastSubmitDate  DATE,

 LastSubmitTime  INTEGER FORMAT '99:99:99'

)

UNIQUE PRIMARY INDEX (RequestId);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedRequests;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT TableName FROM DBC.Tables WHERE TableName = 'z60SchedRequests' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

TableName

------------------------------

z60SchedRequests

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedRequests' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO U130SchedRequests

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

  .GOTO AFTERSCHEDREQUESTS

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL U130SchedRequests

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT SchedRequests

   (RequestId, RequestName, UserName, UserDb, AcctString,

    RequestState, Frequency, DaysDates, StartDate, StartTime,

    MaxDate, MaxTime, MaxIsRel, LastSubmitDate, LastSubmitTime)

  SELECT RequestId, RequestName, UserName, UserDb, AcctString,

    RequestState, Frequency, DaysDates, StartDate, StartTime,

    MaxDate, MaxTime, MaxIsRel, LastSubmitDate, LastSubmitTime

   FROM tdwm.z60SchedRequests;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

  .IF errorcode <> 0 THEN .GOTO ERRSchedRequests

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    DROP TABLE tdwm.z60SchedRequests;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    .GOTO AFTERSCHEDREQUESTS

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL ERRSchedReqeusts

+---------+---------+---------+---------+---------+---------+---------+----

    UPDATE GlobalParams SET ParamValue = '130errRequests'

     WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDREQUESTS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedRequestsExe

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedRequestsExe' AND

DatabaseName = 'tdwm' AND ColumnName = 'ResultsName' and CharType = 2;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ColumnName

------------------------------

ResultsName

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDREQUESTSEXE;

.GOTO AFTERSCHEDREQUESTSEXE;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedRequestsExe' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDREQUESTSEXE;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedRequestsExe AS tdwm.z60SchedRequestsExe;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDREQUESTSEXE;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedRequestsExe

(

 RequestId  INTEGER NOT NULL,

 ResultsType  INTEGER NOT NULL,

 ResultsOptions  INTEGER NOT NULL,

 ResultsDate  DATE,

 ResultsTime  INTEGER FORMAT '99:99:99',

 ResultsName  VARCHAR(256) CHARACTER SET UNICODE,

 FieldSeparator  CHAR(1) CHARACTER SET UNICODE,

 NotifyType  INTEGER NOT NULL,

 NotifyString  VARCHAR(256) CHARACTER SET UNICODE,

 RequestText  VARCHAR(30000),

 ReqCharset  VARCHAR(30),

 ResultsEncoding  VARCHAR(30)

)

UNIQUE PRIMARY INDEX (RequestId);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDREQUESTSEXE;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedRequestsSupl

 **/

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedRequestsSupl' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDREQUESTSSUPL;

.GOTO AFTERSCHEDREQUESTSSUPL;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedRequestsSupl

(

 RequestId  INTEGER NOT NULL,

 RequestSeq  SMALLINT NOT NULL,

 RequestText  VARCHAR(31600) CHARACTER SET UNICODE

)

PRIMARY INDEX (RequestId);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDREQUESTSSUPL;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedJobs

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedJobs' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedJobs' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedJobs AS tdwm.z60SchedJobs;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedJobs

(

 JobId   INTEGER NOT NULL,

 RequestId  INTEGER NOT NULL,

 UserName  VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 RequestName  VARCHAR(40) NOT CASESPECIFIC CHARACTER SET UNICODE,

 SubmitDate  DATE,

 SubmitTime  INTEGER FORMAT '99:99:99',

 CurrentMinDate  DATE,

 CurrentMinTime  INTEGER FORMAT '99:99:99',

 MaxDate   DATE,

 MaxTime   INTEGER FORMAT '99:99:99',

 ProcessTime  INTEGER,

 RowCount  INTEGER,

 JobStatus  INTEGER NOT NULL,

 StatusMsg  VARCHAR(256) CHARACTER SET UNICODE

)

UNIQUE PRIMARY INDEX (JobId);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedJobs

(

 JobId   INTEGER NOT NULL,

 RequestId  INTEGER NOT NULL,

 UserName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 RequestName  VARCHAR(40) NOT CASESPECIFIC CHARACTER SET UNICODE,

 SubmitDate  DATE,

 SubmitTime  INTEGER FORMAT '99:99:99',

 CurrentMinDate  DATE,

 CurrentMinTime  INTEGER FORMAT '99:99:99',

 MaxDate   DATE,

 MaxTime   INTEGER FORMAT '99:99:99',

 ProcessTime  INTEGER,

 RowCount  INTEGER,

 JobStatus  INTEGER NOT NULL,

 StatusMsg  VARCHAR(256) CHARACTER SET UNICODE

)

UNIQUE PRIMARY INDEX (JobId);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

SELECT TableName FROM DBC.Tables WHERE TableName = 'z60SchedJobs' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

TableName

------------------------------

z60SchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedJobs' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO U130SchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

  .GOTO AFTERSCHEDJOBS

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL U130SchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT SchedJobs SELECT * FROM tdwm.z60SchedJobs;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

  .IF errorcode <> 0 THEN .GOTO ErrSchedJobs

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    DROP TABLE tdwm.z60SchedJobs;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    .GOTO AFTERSCHEDJOBS

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL ERRSchedJobs

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '130errJobs'

   WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDJOBS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedWindows

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedWindows' AND

DatabaseName = 'tdwm' AND ColumnName = 'WindowName' and CharType = 2;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ColumnName

------------------------------

WindowName

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDWINDOWS;

.GOTO AFTERSCHEDWINDOWS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedWindows' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDWINDOWS;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedWindows AS tdwm.z60SchedWindows;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDWINDOWS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedWindows

(

 WindowName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 FromTime  INTEGER FORMAT '99:99:99' NOT NULL,

 ToTime   INTEGER FORMAT '99:99:99' NOT NULL,

 DaysOfWeek  INTEGER NOT NULL,

 WindowEnabled  INTEGER NOT NULL

)

UNIQUE PRIMARY INDEX (WindowName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDWINDOWS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedUsers

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedUsers' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedUsers' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE TDWM.SchedUsers AS TDWM.z60SchedUsers;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE TDWM.SchedUsers

(

 UserName     VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE

,

 UserPasswd   VARBYTE(512),

 UserMech     VARCHAR(8),

 MechData     VARBYTE(63000),

 ImplicitName INTEGER

)

UNIQUE PRIMARY INDEX (UserName);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE TDWM.SchedUsers

(

 UserName     VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 UserPasswd   VARBYTE(60),

 UserMech     VARCHAR(8),

 MechData     VARBYTE(64000),

 ImplicitName INTEGER

)

UNIQUE PRIMARY INDEX (UserName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

SELECT TableName FROM DBC.Tables WHERE TableName = 'z60SchedUsers' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

TableName

------------------------------

z60SchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedUsers' AND

DatabaseName = 'tdwm' AND ColumnName = 'UserName' AND CharType = 2;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO U130SchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

  .GOTO AFTERSCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL U130SchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT TDWM.SchedUsers SELECT * FROM tdwm.z60SchedUsers;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

  .IF errorcode <> 0 THEN .GOTO ERRSchedUsers

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    DROP TABLE tdwm.z60SchedUsers;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    .GOTO AFTERSCHEDUSERS

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL ERRSchedUsers

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '130errUsers'

   WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDUSERS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedProfiles

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedProfiles' AND

DatabaseName = 'tdwm' AND ColumnName = 'ProfileName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedProfiles' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedProfiles AS tdwm.z60SchedProfiles;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedProfiles

(

 ProfileName  VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE

,

 ProfileType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 AllowedScheduling INTEGER NOT NULL,

 AllowedOptions  INTEGER NOT NULL,

 MaxStartInterval INTEGER NOT NULL,

 JobDuration  INTEGER NOT NULL,

 ResultsDuration  INTEGER NOT NULL,

 AllowedResultsTypes INTEGER NOT NULL,

 ResultsDb  VARCHAR(128) NOT CASESPECIFIC CHARACTER SET UNICODE,

 WorkgroupName  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 FileStorageName  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 RelativePath  VARCHAR(128) CHARACTER SET UNICODE,

 MaxFileLength  INTEGER NOT NULL,

 FieldSepChar  INTEGER NOT NULL

)

UNIQUE PRIMARY INDEX (ProfileName, ProfileType);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedProfiles

(

 ProfileName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 ProfileType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 AllowedScheduling INTEGER NOT NULL,

 AllowedOptions  INTEGER NOT NULL,

 MaxStartInterval INTEGER NOT NULL,

 JobDuration  INTEGER NOT NULL,

 ResultsDuration  INTEGER NOT NULL,

 AllowedResultsTypes INTEGER NOT NULL,

 ResultsDb  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 WorkgroupName  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 FileStorageName  VARCHAR(30) NOT CASESPECIFIC CHARACTER SET UNICODE,

 RelativePath  VARCHAR(128) CHARACTER SET UNICODE,

 MaxFileLength  INTEGER NOT NULL,

 FieldSepChar  INTEGER NOT NULL

)

UNIQUE PRIMARY INDEX (ProfileName, ProfileType);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

SELECT TableName FROM DBC.Tables WHERE TableName = 'z60SchedProfiles' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

TableName

------------------------------

z60SchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedProfiles' AND

DatabaseName = 'tdwm' AND ColumnName = 'ProfileName' AND CharType = 2;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO U130SchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Update completed. One row changed.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

  .GOTO AFTERSCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL U130SchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

  INSERT SchedProfiles SELECT * FROM tdwm.z60SchedProfiles;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

  .IF errorcode <> 0 THEN .GOTO ERRSchedProfiles

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    DROP TABLE tdwm.z60SchedProfiles;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

    .GOTO AFTERSCHEDPROFILES

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL ERRSchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

  UPDATE GlobalParams SET ParamValue = '130errProfiles'

   WHERE ParamName = 'SCHED_VERSION' AND ParamValue <> '60migrate';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDPROFILES;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedWorkgroups

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedWorkgroups' AND

DatabaseName = 'tdwm' AND ColumnName = 'WorkgroupName' and CharType = 2;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ColumnName

------------------------------

WorkgroupName

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDWORKGROUPS;

.GOTO AFTERSCHEDWORKGROUPS;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedWorkgroups' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDWORKGROUPS;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedWorkgroups AS tdwm.z60SchedWorkgroups;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDWORKGROUPS;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedWorkgroups

(

 WorkgroupName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICOD

E,

 WorkgroupPriority INTEGER NOT NULL,

 MaxExecutors  INTEGER NOT NULL

)

UNIQUE PRIMARY INDEX (WorkgroupName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDWORKGROUPS;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedFileStorage

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedFileStorage' AND

DatabaseName = 'tdwm' AND ColumnName = 'FileStorageName' and CharType = 2;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

ColumnName

------------------------------

FileStorageName

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDFILESTORAGE;

.GOTO AFTERSCHEDFILESTORAGE;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedFileStorage' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDFILESTORAGE;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedFileStorage AS tdwm.z60SchedFileStorage;

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

UPDATE GlobalParams SET ParamValue = '60migrate' WHERE ParamName = 'SCHED_V

ERSION';

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDFILESTORAGE;

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedFileStorage

(

 FileStorageName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNIC

ODE,

 FileStoragePath  VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNI

CODE

)

UNIQUE PRIMARY INDEX (FileStorageName);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDFILESTORAGE;

+---------+---------+---------+---------+---------+---------+---------+----

/**

 **  SchedUpdates

 **/

SELECT ColumnName FROM DBC.Columns WHERE TableName = 'SchedUpdates' AND

DatabaseName = 'tdwm' AND ColumnName = 'UpdateName' AND CharType = 2 AND

ColumnLength = 256;

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTERSCHEDUPDATES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT Version FROM DBC.Tables WHERE TableName = 'SchedUpdates' AND

TableKind = 'T' AND DatabaseName = 'tdwm';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

     Version

------------

           1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO CREATESCHEDUPDATES;

+---------+---------+---------+---------+---------+---------+---------+----

RENAME TABLE tdwm.SchedUpdates AS tdwm.z60SchedUpdates;

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATESCHEDUPDATES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT InfoData FROM DBC.DBCInfo WHERE SUBSTRING(InfoData FROM 1 FOR 2) < '

07' AND InfoKey = 'VERSION';

 *** Query completed. No rows found.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO CREATE_V2R6_SCHEDUPDATES

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedUpdates

(

 UpdateDate  DATE,

 UpdateTime  INTEGER FORMAT '99:99:99' NOT NULL,

 Operation  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 UpdateType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 UpdateName  VARCHAR(128) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 ProfileType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 Id   INTEGER NOT NULL,

 ServerId  INTEGER NOT NULL

)

PRIMARY INDEX (UpdateDate, UpdateTime);

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.GOTO EXIST_z60SchedUpdates

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL CREATE_V2R6_SCHEDUPDATES

+---------+---------+---------+---------+---------+---------+---------+----

CREATE TABLE SchedUpdates

(

 UpdateDate  DATE,

 UpdateTime  INTEGER FORMAT '99:99:99' NOT NULL,

 Operation  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 UpdateType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 UpdateName  VARCHAR(30) NOT CASESPECIFIC NOT NULL CHARACTER SET UNICODE,

 ProfileType  VARCHAR(10) NOT CASESPECIFIC NOT NULL,

 Id   INTEGER NOT NULL,

 ServerId  INTEGER NOT NULL

)

PRIMARY INDEX (UpdateDate, UpdateTime);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL EXIST_z60SchedUpdates

+---------+---------+---------+---------+---------+---------+---------+----

SELECT CharType FROM DBC.Columns WHERE TableName = 'z60SchedUpdates' AND

DatabaseName = 'tdwm' AND ColumnName = 'UpdateName';

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

CharType

--------

       1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount < 1 THEN .GOTO AFTERSCHEDUPDATES;

+---------+---------+---------+---------+---------+---------+---------+----

  /* No need to retain SchedUpdates data */

  DROP TABLE tdwm.z60SchedUpdates;

 *** Table has been dropped.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTERSCHEDUPDATES;

+---------+---------+---------+---------+---------+---------+---------+----

SELECT 1 FROM SchedWindows SAMPLE 1;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 2 seconds.

   1

----

   1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_InsSchedWindows

.GOTO AFTER_InsSchedWindows

+---------+---------+---------+---------+---------+---------+---------+----

INSERT INTO SchedWindows VALUES ('EVENINGS', 180000, 240000, 127, 1);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_InsSchedWindows

+---------+---------+---------+---------+---------+---------+---------+----

SELECT 1 FROM SchedFileStorage SAMPLE 1;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

   1

----

   1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_InsSchedFS

.GOTO AFTER_InsSchedFS

+---------+---------+---------+---------+---------+---------+---------+----

INSERT INTO SchedFileStorage VALUES ('DEFAULT_FILE_STORAGE', 'C:\TEMP');

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_InsSchedFS

+---------+---------+---------+---------+---------+---------+---------+----

SELECT 1 FROM SchedWorkgroups SAMPLE 1;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 2 seconds.

   1

----

   1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_InsSchedWG

.GOTO AFTER_InsSchedWG

+---------+---------+---------+---------+---------+---------+---------+----

INSERT INTO SchedWorkgroups VALUES ('DEFAULT_WORKGROUP', 1, 5);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_InsSchedWG

+---------+---------+---------+---------+---------+---------+---------+----

SELECT 1 FROM SchedProfiles SAMPLE 1;

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 2 seconds.

   1

----

   1

+---------+---------+---------+---------+---------+---------+---------+----

.IF activitycount > 0 THEN .GOTO AFTER_InsSchedProfiles

.GOTO AFTER_InsSchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

INSERT INTO SchedProfiles VALUES (

 'DEFAULT_USER_PROFILE', 'USER', 2, 1792, 100, 7, 7, 3,

 'defaultdb', 'DEFAULT_WORKGROUP', 'DEFAULT_FILE_STORAGE',

 NULL, 1000000, 0);

 *** Skipped.

+---------+---------+---------+---------+---------+---------+---------+----

.LABEL AFTER_InsSchedProfiles

+---------+---------+---------+---------+---------+---------+---------+----

GRANT SELECT ON SchedServers TO PUBLIC;

 *** Grant accepted.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

GRANT ALL PRIVILEGES ON tdwm TO tdwm WITH GRANT OPTION;

 *** Grant accepted.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

GRANT SELECT ON dbc TO tdwm;

 *** Grant accepted.

 *** Total elapsed time was 1 second.

+---------+---------+---------+---------+---------+---------+---------+----

.QUIT

 *** You are now logged off from the DBC.

 *** Exiting BTEQ...

 *** RC (return code) = 4