Usage
Creates or modifies a request for a snap-shot copy.
CREATE V5 COPY REQUEST name AT [DISTRIBUTION] distname
Or ALTER V5 COPY REQUEST name AT [DISTRIBUTION] distname TO
[PATHGROUP name]
[SCHEDULE START {NOW | ON month/day/year [AT hours:minutes:seconds]}
[DURATION n {HOUR[S]|MINUTE[S]|SECOND[S]|DAY[S]|MONTH[S]}]
[STOP ON month/day/year [AT hours:minutes:seconds] ]
[EVERY n {HOUR[S]|MINUTE[S]|SECOND[S]|DAY[S]|MONTH[S]}]
]
[CONNECT TO [SERVER] server-name USING username] ...
[ON_ERROR {TERMINATE | SKIP_RECORD | NEXT_TABLE}]
[COMMIT {EACH_TABLE | ALL_TABLES | EVERY n RECORDS}]
[ISOLATION {READ_UNCOMMITTED | READ_COMMITTED |
REPEATABLE_READ | SERIALIZABLE | VERSIONING}]
[LOCKING {BY_TABLE | ALL_TABLES}]
[[NOT] ORDERED_RETRIEVAL]
[[NOT] USELOADER]
[APPLY {DELETE | APPEND | REFRESH | MERGE}
[DESCRIPTION ‘descriptive text’]
;
The CREATE default is COMMIT EVERY 100 RECORDS.
Parameters
Parameter |
Description |
---|---|
CREATE |
Establish a new copy request in a previously defined distribution. |
ALTER |
Modify a previously established copy request. Specify the distribution for this request. |
PATHGROUP |
Specify the path group (if any) to use for this request. |
SCHEDULE... |
Set copy request times:
|
CONNECT |
Specify a username for a server connection. |
ON_ERROR |
Determines what to do if recoverable errors are encountered:
Terminate the request. This is the default option.
Copy Retriever/Applier goes on to the next record. If the request’s Target apply mode is Delete on target, refresh, and deletion of the table data fails, the copy phase is skipped for the table.
Copy Retriever/Applier goes on to the next table in the request. |
COMMIT |
Determine the number of rows to copy per commit(the default value is 100 rows per commit): •EACH_TABLE All rows for each table. Each table is committed as a unit. •ALL_TABLES All rows for all tables. The entire request is committed as a unit. •EVERY n RECORDS Every specified number of rows. |
ISOLATION |
Determine the transaction isolation level on the source. The higher the isolation level you use, the more consistent the results are that Copy produces. For details on transaction isolation levels, see your SQL manual. Not all SQL DBMSs provide all four isolation levels. Check what levels are available for your DBMS.
Note: DB2 provides this isolation level only when a table has a Type 2 index. If your source table does not have a Type 2 index and you specify READ_UNCOMMITTED, you will get READ_COMMITTED functionality instead.
New rows that satisfy a search condition of the extraction may be added by other concurrent transactions. However, your extract transaction will not include those rows.
|
LOCKING |
Determine whether a source table is locked for the entire request or only while this single table is being copied:
|
ORDERED_RETRIEVAL |
Specify that the order in which tables are retrieved is important. They are retrieved in the order defined to the distribution. |
APPLY |
Determine how to apply rows to the receiving table:
If your request has multiple tables, the Copy Applier completes its work in two passes: In the first pass, all the deletions from all the tables involved are completed. In the second pass, all the sending table rows are inserted. In the first pass, the selected tables are processed from the bottom to the top in their copy request display order. In the second pass, the tables are processed in top-to-bottom order. Important: If you select this mode, all the rows in the target table will be deleted, even if you defined specific rows to copy based on a gate condition specified in the CREATE TABLE MAPPING statement. If this is not what you want, select a different mode, or manually delete the rows on the target and then run the Copy request.
|
DESCRIPTION |
User-defined text. |