NonStop SQL/MP Reference Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- A
- Access Options
- ADD DEFINE Command
- AGGREGATE Functions
- Alias
- ALLOCATE File Attribute
- ALTER CATALOG Statement
- ALTER COLLATION Statement
- ALTER DEFINE Command
- ALTER INDEX Statement
- ALTER PROGRAM Statement
- ALTER TABLE Statement
- ALTER VIEW Statement
- APPEND Command
- APPENDCANCEL Command
- APPENDRESTART Command
- AS Clause
- AS DATE/TIME Clause
- ASCII Character Set
- AUDIT File Attribute
- AUDITCOMPRESS File Attribute
- Audited Tables
- AVG Function
- B
- C
- CANCEL Command
- CASE Expression
- CAST Function
- CATALOG Command
- Catalogs
- CATALOGS Table
- CENTER_REPORT Option
- Character Data Types
- Character Expressions
- Character Sets
- CHAR_LENGTH Function
- CLEANUP Command
- CLEARONPURGE File Attribute
- CLOSE Statement
- Clustering Keys
- COLLATE Clause
- Collation Definitions
- Column Identifier
- Columns
- COLUMNS Table
- COMMENT Statement
- Comments
- COMMENTS Table
- COMMIT Option
- COMMIT WORK Statement
- Comparison Predicate
- COMPUTE_TIMESTAMP Function
- CONCAT Clause
- Concurrency
- Constraints
- CONSTRNT Table
- CONTINUE Statement
- CONTROL EXECUTOR Directive
- CONTROL QUERY Directive
- CONTROL TABLE Directive
- CONVERT Command
- CONVERTTIMESTAMP Function
- COPY Command
- Correlation Names
- COUNT Function
- CPRLSRCE Table
- CPRULES Table
- CREATE CATALOG Statement
- CREATE COLLATION Statement
- CREATE CONSTRAINT Statement
- CREATE INDEX Statement
- CREATE SYSTEM CATALOG Command
- CREATE TABLE Statement
- CREATE VIEW Statement
- CURRENT Function
- CURRENT_TIMESTAMP Function
- Cursors
- C89
- D
- Data Dictionary
- Data Types
- DATE Data Type
- DATE_FORMAT Option
- DATE-TIME Data Types
- DATE-TIME Functions
- DATE-TIME Literals
- DATEFORMAT Function
- DATETIME Data Type
- DAYOFWEEK Function
- DCL (Data Control Language) Statements
- DCOMPRESS File Attribute
- DDL (Data Definition Language) Statements
- Deadlocks
- DECIMAL_POINT Option
- DECLARE CURSOR Statement
- DEFAULT Clause
- DEFINEs
- DELETE DEFINE Command
- DELETE Statement
- DESCRIBE INPUT Statement
- DESCRIBE Statement
- Detail Alias
- DETAIL Command
- DISPLAY STATISTICS Command
- DISPLAY USE OF Command
- DISTINCT Clause
- DML (Data Manipulation Language) Statements
- DOWNGRADE CATALOG Command
- DOWNGRADE SYSTEM CATALOG Command
- DROP Statement
- DROP SYSTEM CATALOG Command
- DSL (Data Status Language) Statements
- DSLACK File Attribute
- DUP Command
- Dynamic SQL
- E
- F
- G
- H
- I
- ICOMPRESS File Attribute
- IF/THEN/ELSE Clause
- IN Predicate
- INCLUDE SQLCA Directive
- INCLUDE SQLDA Directive
- INCLUDE SQLSA Directive
- INCLUDE STRUCTURES Directive
- Index Keys
- INDEXES Table
- Indicator Variables and Indicator Parameters
- INFO DEFINE Command
- INITIALIZE SQL Command
- INSERT Statement
- INTERVAL Data Type
- INTERVAL Literals
- INVOKE Directive and Command
- ISLACK File Attribute
- J
- K
- L
- M
- N
- O
- P
- PAGE_COUNT Option
- PAGE FOOTING Command
- PAGE_LENGTH Option
- PAGE_NUMBER Function
- PAGE TITLE Command
- Parallel Index Loading
- Parameters
- PARTITION Clause
- Partitions
- PARTNS Table
- PERUSE Command
- Plans
- POSITION Function
- Predicates
- PREPARE Statement
- Primary Keys
- Print Item
- PROGID File Attribute
- Program Invalidation
- PROGRAMS Table
- Protection View
- PURGE Command
- PURGEDATA Command
- Q
- R
- RECLENGTH File Attribute
- RELEASE Statement
- REPORT FOOTING Command
- REPORT Option
- REPORT TITLE Command
- Report Writer
- Reserved Words
- RESET DEFINE Command
- RESET LAYOUT Command
- RESET PARAM Command
- RESET PREPARED Command
- RESET REPORT Command
- RESET SESSION Command
- RESET STYLE Command
- RESETBROKEN File Attribute
- RIGHT_MARGIN Option
- ROLLBACK WORK Statement
- ROWCOUNT Option
- S
- Sample Database
- SAVE Command
- Search Conditions
- SECURE Command
- SECURE File Attribute
- Security
- SELECT Statement
- SERIALWRITES File Attribute
- SET DEFINE Command
- SET DEFMODE Command
- SET LAYOUT Command
- SET PARAM Command
- SET SESSION Command
- SET STYLE Command
- SETSCALE Function
- Shorthand View
- SHOW CONTROL Command
- SHOW DEFINE Command
- SHOW DEFMODE Command
- SHOW LAYOUT Command
- SHOW PARAM Command
- SHOW PREPARED Command
- SHOW REPORT Command
- SHOW SESSION Command
- SHOW STYLE Command
- Similarity Checks
- SLACK File Attribute
- SPACE Option
- SQL Directive
- SQL Identifiers
- SQLCI
- SQLCI Commands
- SQLCODE
- SQLCOMP Command
- Standards Conformance
- Statements
- Static SQL
- Statistics
- Storage Management Foundation (SMF)
- String Functions
- String Literals
- Subqueries
- SUBSTRING Function
- SUBTOTAL Command
- SUBTOTAL_LABEL Option
- SUM Function
- Super ID
- Syskeys
- System Catalog
- SYSTEM Command
- System DEFINEs
- T
- U
- V
- W
- Z
- ! COMMAND
- =_AUDSERV_XSWAP_node DEFINE
- =_DEFAULTS DEFINE
- =_SORT_DEFAULTS DEFINE
- =_SQL_CAT_HEAP_LIMIT DEFINE
- =_SQL_CMP_DOUBLE_SBB_OFF DEFINE
- =_SQL_CMP_DOUBLE_SBB_ON DEFINE
- =_SQL_CMP_EQ_LIMIT DEFINE
- =_SQL_CMP_EVENT DEFINE
- =_SQL_CMP_EVENT_NO0 DEFINE
- =_SQL_CMP_NO_KS_MJOIN DEFINE
- =_SQL_cmp_node DEFINE
- =_SQL_EXE_DOUBLE_SHUTOFF DEFINE
- =_SQL_EXE_ESPS_CK_CMON DEFINE
- =_SQL_EXE_USE_SWAPVOL DEFINE
- =_SQL_MSG_node DEFINE
- =_SQL_RECGEN_node DEFINE
- =_SQL_TM_node_vol DEFINE
- Index
NonStop SQL/MP Reference Manual—142115
D-77
Examples—DUP
If a DUP operation fails after correctly duplicating some objects and files, restarting
the operation from the beginning causes errors unless the original operation used the
TARGET PURGE option. Determine the objects and files that were duplicated and
consider the appropriate setting for the TARGET option before you restart a
partially successful DUP operation.
If an unusual situation occurs while a collation is being duplicated, two temporary
files (ZZCLnnnn and ZZCSnnnn, where nnnn is a number) might be left in the same
subvolume as the source collation. You can purge both of these files with the
PURGE command.
Examples—DUP
•
The following command copies table $VOL1.PERSNL.JOB to subvolume
$NEWVOL.PERSNL and gives it the same name as the original table. The new
table will be described in the current default catalog because the CATALOG option
is not specified. The JOB table has no dependent objects.
>> DUP $VOL1.PERSNL.JOB, $NEWVOL.PERSNL.JOB LISTALL;
The following command does the same thing:
>> DUP $VOL1.PERSNL.JOB, $NEWVOL.*.* LISTALL;
•
The following command copies table $VOL1.PERSNL.JOB to the remote volume
\SYS2.$NEWVOL, using the same table name as the original. The CATALOG
option specifies a catalog on the remote node in which to describe the new table.
>> DUP $VOL1.PERSNL.JOB,\SYS2.$NEWVOL.PERSNL.JOB,
+> CATALOG \SYS2.$NEWVOL.CAT FOR \SYS2.$NEWVOL.PERSNL.JOB;
•
The following example copies a partitioned table, PARTLOC, that has a primary
partition on $VOL1 and secondary partitions and indexes on $WHS2 and $WHS3.
PARTLOC has an index, PARTIX, and a dependent protection view, PARTVW. The
example copies PARTLOC to subvolumes of the same name on three different
volumes, copying PARTIX and PARTVW also, because the default options
INDEXES IMPLICIT and VIEWS IMPLICIT apply.
>> DUP $VOL1.INVENT.PARTLOC, *.TESTINV.*;
DUPLICATED TABLE $VOL1.INVENT.PARTLOC TO
$VOL1.TESTINV.PARTLOC
PARTS (1, $WHS2 TO $WHS2,
2, $WHS3 TO $WHS3)
INDEX $VOL1.INVENT.PARTIX TO $VOL1.TESTINV.PARTIX
PVIEW $VOL1.INVENT.PARTVW TO $VOL1.TESTINV.PARTVW
•
The following example copies the partitioned table from the previous example to a
different node, \NEWSYS, using the MAP NAMES option. Objects on $VOL1 are
placed on $NVOL1, objects on $WHS2 are placed on $NVOL2, and objects on
$WHS3 are placed on $NVOL3. Subvolume and table names remain the same. The