Use the PROMOTE REGISTRATION command to promote
existing registrations.
Syntax
.-,------------------------.
V |
>>-PROMOTE REGISTRATION--(----+-------------+--objname-+--)----->
'-objowner--.-'
>--+------------------------+----------------------------------><
'-USING--| new-clause |-'
new-clause
|--+----------------------+--+----------------------------+----->
'-SOURCE DB--aliasname-' '-CAPTURE SCHEMA--schemaname-'
>--+-TABLE--| tbl-clause |--+-----------------------------------|
'-VIEW--| view-clause |-'
tbl-clause
|--+---------------------+-------------------------------------->
'-CD SCHEMA--cdschema-'
>--+----------------------------------------+-------------------|
'-CREATE SOURCE WITH SCHEMA--tableschema-'
view-clause
|--+--------------------------------------------------------------------+-->
'-CD SCHEMA FOR--+------------------+--+---------------------------+-'
'-VIEW--viewschema-' '-SOURCE TABLE--tableschema-'
>--+---------------------------------------------------------------------------------+--|
'-CREATE SOURCE VIEW--+-------------------------------+--USING SCHEMA--viewschema-'
'-WITH UNREGISTERED BASE TABLES-'
Parameters
- objowner.
- Specifies the owner of the source object (table, view, or nickname) to
promote. You can specify multiple objects.
- objname
- Specifies the name of the source object (table, view, or nickname) to
promote. You can specify multiple objects.
new-clause:
- SOURCE DB aliasname
- Specifies the new source database alias for the promoted object. This
database is where you will run the generated script.
- CAPTURE SCHEMA schemaname
- Specifies the Capture schema to use when promoting a registration.
- TABLE
- Specifies a CD table.
- VIEW
- Specifies a CD view.
tbl-clause:
- CD SCHEMA cdschema
- Specifies the new CD-table schema name for the promoted object.
- CREATE SOURCE WITH SCHEMA tableschema
- Specifies the new source-table schema name to use when promoting the underlying
table.
view-clause:
- CD SCHEMA FOR
- VIEW viewschema
- Specifies the new CD-view schema name for the promoted object.
- SOURCE TABLE tableschema
- Specifies the new CD-table schema name for the promoted object.
- CREATE SOURCE VIEW
- Specify to promote the view on the new source.
- WITH UNREGISTERED BASE TABLES
- Specify to promote underlying base tables that are not registered.
- USING SCHEMA viewschema
- Specifies the new source-view schema name to use when promoting the underlying
view and the unregistered base tables.
Usage notes
- If you do not specify the USING parameter, this command
uses the existing values for the object.
- This command uses the following rules when generating the SQL scripts:
- All views and tables referenced by the registered views exist on the new
server.
- All registered source tables referenced by the registered views are already
promoted to the new server.
- The WITH UNREGISTERED BASE TABLES clause promotes
only the unregistered base tables of the view. It does not promote the registered
base tables. You must promote the registered base tables separately before
promoting the registered view.
- The same new schema name will be used for both the underlying base tables
and the view.
- The command does not support a new source CD schema when promoting subscription
sets; do not change the CD schema when promoting registrations.
Example 1
To promote the registration for DB2ADMIN.STAFF
using the SAMPLE database and ASN1 schema:
PROMOTE REGISTRATION (DB2ADMIN.STAFF) USING SOURCE DB SAMPLE TABLE CD SCHEMA ASN1
Example 2
To promote the registration for DB2ADMIN.STAFF
and to name the new CD-table schema STAFF:
PROMOTE REGISTRATION (DB2ADMIN.STAFF) USING VIEW CD SCHEMA FOR SOURCE TABLE STAFF