D.2 Method of setting SQL script file
When setting up SQL script file, you must rename tables and RD Areas or table areas.
- Organization of this subsection
(1) Renaming tables
Change the following part of each table in SQL script file.
-
<individualname>: Cluster name or HCSC server name
The following table describes the renaming rules for each table.
|
Table name of index name before replacement |
Replacement method |
Example |
|---|---|---|
|
CSCMSG_<individualname>_CSC_CONNECT CSCMSG_<individualname>_EXECHISTORY CSCMSG_<individualname>_EXECHISTORY_I CSCMSG_<individualname>_CLUSTER CSCMSG_<individualname>_HA_ASYNC_ADP |
C<cluster name> |
|
|
CSCMSG_<individualname>_CSC_PERSIST CSCMSG_<individualname>_LC_DIRECTORY CSCMSG_<individualname>_LC_BPFORMAT CSCMSG_<individualname>_RT_RULE CSCMSG_<individualname>_CV_MAPPING CSCMSG_<individualname>_CV_FORMAT |
S<HCSC server name> |
|
|
CSCBP_<individualname>_PROCESS CSCBP_<individualname>_ACTIVITY CSCBP_<individualname>_LINK CSCBP_<individualname>_CORRELATIONSET CSCBP_<individualname>_STR_VARIABLE CSCBP_<individualname>_NUM_VARIABLE CSCBP_<individualname>_BOOL_VARIABLE CSCBP_<individualname>_MSG_VARIABLE CSCBP_<individualname>_MSG_RELATION CSCBP_<individualname>_PROCESS_IDX1 CSCBP_<individualname>_PROCESS_IDX2 CSCBP_<individualname>_PROCESS_IDX3 CSCBP_<individualname>_PROCESS_IDX4 CSCBP_<individualname>_ACTIVITY_IDX CSCBP_<individualname>_LINK_IDX CSCBP_<individualname>_CORREL_IDX1 CSCBP_<individualname>_CORREL_IDX2 CSCBP_<individualname>_STR_VAR_IDX CSCBP_<individualname>_NUM_VAR_IDX CSCBP_<individualname>_BOOL_VAR_IDX CSCBP_<individualname>_MSG_VAR_IDX CSCBP_<individualname>_MSG_REL_IDX1 CSCBP_<individualname>_MSG_REL_IDX2 CSCBP_<individualname>_MSG_REL_IDX3 CSCBP_<individualname>_V_ACTIVITY CSCBP_<individualname>_V_LINK CSCBP_<individualname>_V_STR_VARIABLE CSCBP_<individualname>_V_NUM_VARIABLE CSCBP_<individualname>_V_BOOL_VARIABLE CSCBP_<individualname>_V_MSG_VARIABLE |
<cluster name> |
|
(2) Renaming RD Areas or table areas
Rename RD Areas or table areas for each database as follows:
(a) For HiRDB
Rewrite the following part of each table in SQL script file. If RD Area is not specified, delete "IN <RDDATA>" or "IN <RDINDX>".
-
IN <RDDATA>: Specifies the name of the RD Area that stores each table.
-
IN <RDINDX>: Specifies the name of the RD Area that stores each index.
Further, if SQL script file "CreateTables_HiRDB_for_Range.sql" or "CreateTables_HiRDB_for_Matrix.sql" is used, rewrite the following part.
-
<RDDATAn>: Specifies the name of the RD Area that stores n Month (n: 01~12) data.
-
<RDINDXn>: Specifies the name of the RD Area that stores n Month (n: 01~12) index.
By dividing RD Area specification in January~December, you can assign RD Area cyclically in 1 year unit (12 months). Also, you can conserve the required RD area, by specifying same RD Area in multiple months.
- (Example 1)
-
The example shows the following contents defined in SQL script file "CreateTables_HiRDB_for_Range.sql".
Unit of data to be handled: 1 month
Cyclic assignment period: 3 months
-
Table definition example
IN ((RDDATA1)'01', /* RD Area that stores data for January */ (RDDATA2)'02', /* RD Area that stores data for February */ (RDDATA3)'03', /* RD Area that stores data for March */ (RDDATA1)'04', /* RD Area that stores data for April */ (RDDATA2)'05', /* RD Area that stores data for May */ (RDDATA3)'06', /* RD Area that stores data for June */ (RDDATA1)'07', /* RD Area that stores data for July */ (RDDATA2)'08', /* RD Area that stores data for August */ (RDDATA3)'09', /* RD Area that stores data for September */ (RDDATA1)'10', /* RD Area that stores data for October */ (RDDATA2)'11', /* RD Area that stores data for November */ (RDDATA3)); /* RD Area that stores data for December */
-
Index definition example
IN ((RDINDEX1), /* RD Area that stores index for January */ (RDINDEX2), /* RD Area that stores index for February */ (RDINDEX3), /* RD Area that stores index for March */ (RDINDEX1), /* RD Area that stores index for April */ (RDINDEX2), /* RD Area that stores index for May */ (RDINDEX3), /* RD Area that stores index for June */ (RDINDEX1), /* RD Area that stores index for July */ (RDINDEX2), /* RD Area that stores index for August */ (RDINDEX3), /* RD Area that stores index for September */ (RDINDEX1), /* RD Area that stores index for October */ (RDINDEX2), /* RD Area that stores index for November */ (RDINDEX3));/* RD Area that stores index for December */
-
- (Example 2)
-
The example shows the following contents defined in SQL script file "CreateTables_HiRDB_for_Matrix.sql.
Unit of data to be handled: 1 month
Cyclic assignment period: 3 months
Backend servers: 3
-
Table definition example
IN ((BES1RDDATA1,BES2RDDATA1,BES3RDDATA1), /* RD Area that stores data for January */ (BES1RDDATA2,BES2RDDATA2,BES3RDDATA2), /* RD Area that stores data for February */ (BES1RDDATA3,BES2RDDATA3,BES3RDDATA3), /* RD Area that stores data for March */ (BES1RDDATA1,BES2RDDATA1,BES3RDDATA1), /* RD Area that stores data for April */ (BES1RDDATA2,BES2RDDATA2,BES3RDDATA2), /* RD Area that stores data for May */ (BES1RDDATA3,BES2RDDATA3,BES3RDDATA3), /* RD Area that stores data for June */ (BES1RDDATA1,BES2RDDATA1,BES3RDDATA1), /* RD Area that stores data for July */ (BES1RDDATA2,BES2RDDATA2,BES3RDDATA2), /* RD Area that stores data for August */ (BES1RDDATA3,BES2RDDATA3,BES3RDDATA3), /* RD Area that stores data for September */ (BES1RDDATA1,BES2RDDATA1,BES3RDDATA1), /* RD Area that stores data for October */ (BES1RDDATA2,BES2RDDATA2,BES3RDDATA2), /* RD Area that stores data for November */ (BES1RDDATA3,BES2RDDATA3,BES3RDDATA3));/* RD Area that stores data for December */
-
Index definition example
IN ((BES1RDINDEX1,BES2RDINDEX1,BES3RDINDEX1), /* RD Area that stores index for January */ (BES1RDINDEX2,BES2RDINDEX2,BES3RDINDEX2), /* RD Area that stores index for February */ (BES1RDINDEX3,BES2RDINDEX3,BES3RDINDEX3), /* RD Area that stores index for March */ (BES1RDINDEX1,BES2RDINDEX1,BES3RDINDEX1), /* RD Area that stores index for April */ (BES1RDINDEX2,BES2RDINDEX2,BES3RDINDEX2), /* RD Area that stores index for May */ (BES1RDINDEX3,BES2RDINDEX3,BES3RDINDEX3), /* RD Area that stores index for June */ (BES1RDINDEX1,BES2RDINDEX1,BES3RDINDEX1), /* RD Area that stores index for July */ (BES1RDINDEX2,BES2RDINDEX2,BES3RDINDEX2), /* RD Area that stores index for August */ (BES1RDINDEX3,BES2RDINDEX3,BES3RDINDEX3), /* RD Area that stores index for September */ (BES1RDINDEX1,BES2RDINDEX1,BES3RDINDEX1), /* RD Area that stores index for October */ (BES1RDINDEX2,BES2RDINDEX2,BES3RDINDEX2), /* RD Area that stores index for November */ (BES1RDINDEX3,BES2RDINDEX3,BES3RDINDEX3));/* RD Area that stores index for December */
-
Additionally, to use the table split functionality (range split or matrix split) and specify SplitKey as search condition in -where option or -wherefile option of cscpiselect command, you must change CREATE VIEW of SQL script file. For the relationship between commands and view table, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide". If you do not specify SplitKey in the search conditions of cscpiselect command, we recommend that you do not change CREATE VIEW, to avoid any adverse effect on the process performance.
- (Example 3)
-
The definition example of CSCBP_<individualname>_V_ACTIVITY view table is as follows:
CREATE VIEW CSCBP_<individualname>_V_ACTIVITY ( ProcessID, ActivityNumber, ProcessDefinitionName, ProcessDefinitionVersion, ActivityDefinitionName, ActivityKind, ParentNumber, ScopeNumber, RepeatNumber, State, FirstChildNumber, LastChildNumber, StartTime, EndTime, WaitTime, CSCServerName, SplitKey ...... #1 ) AS SELECT a.ProcessID, a.ActivityNumber, p.ProcessDefinitionName, p.ProcessDefinitionVersion, a.ActivityDefinitionName, a.ActivityKind, a.ParentNumber, a.ScopeNumber, a.RepeatNumber, a.State, a.FirstChildNumber, a.LastChildNumber, a.StartTime, a.EndTime, a.WaitTime, p.CSCServerName, p.SplitKey ...... #2 FROM CSCBP_<individualname>_ACTIVITY a, CSCBP_<individualname>_PROCESS p WHERE a.ProcessID = p.ProcessID;- Note#1
-
Add the SplitKey column at the end of the configuration string in accordance with the contents in "Appendix C.1(4) View table information".
- Note#2
-
Specify the column name of reference table in accordance with the contents in "Appendix C.1(4) View table information".
(b) For Oracle
Rewrite the following part of each table or index in SQL script file. If table area is not specified, delete "TABLESPACE <EXAMPLE>".
-
TABLESPACE <EXAMPLE>
Specifies the table area to be used (table space) or table area to store the message variable value (BLOB) from the message variable table.