Trail commands
Trail commands allow you to create and associate a sequence of local or remote trails with a particular Extract group. This is particularly useful in online processing to purge or transfer old Oracle GoldenGate trails without bringing down the associated Extract process.
Use RMTTRAIL commands to create and manage trails on remote systems, and use commands to create and manage local Oracle GoldenGate trails.
ADD EXTTRAIL
Use ADD
EXTTRAIL to create a local trail, associate it with an Extract group,
and assign trail attributes. If the trail already exists, GGSCI rejects the
ADD command.
Syntax
ADD EXTTRAILtrail_name, EXTRACTgroup_name[, OWNERgroup_number,user_number] [, SECURE "rwep"] [, EXTENTS (primary,secondary,maximum) | MEGABYTESnumber] [, MAXFILESnum_files] [, SEQNOnumber] [, CREATE | NOCREATE] [, MAXFILESTHRESHOLD num_files]
-
trail_name -
The fully qualified trail name: $
vol.subvol.trail_prefix. Thetrail_prefixmust be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number. The parameter file forgroup_namemust have a matchingtrail_nameparameter. -
EXTRACTgroup_name -
Specifies the Extract group to which the is bound. Only one group can write to an associated trail.
-
EXTENTS(primary,secondary,maximum) |MEGABYTESnumber -
See "Specifying file size".
-
MAXFILESnum_files -
OWNERgroup_number,user_numberSECURE"rwep" -
See "Specifying security".
-
SEQNOnumber -
See "Specifying sequence number".
See Ongoing Trail Managementfor more information on managing trails.
-
CREATE | NOCREATE -
To specify whether the file is created, see "Using a Local Oracle GoldenGate Trail"".
-
MAXFILESTHRESHOLD -
MAXFILESTHRESHOLDis the amount files left beforeMAXFILESis about to be reached that are displayed to EMS as critical warnings with emphasis.The default is 2.
The current value can be seen with an info
exttrail <trail_name>.
Specifying file size
Control file size with one of the following options:
- Use the
EXTENTSprimary,secondary,maximumoption to specify extent sizes for individual trails. Default extent sizes are 64, 128 and 512. - Use the
MEGABYTESnumberoption to specify the maximum number of megabytes per file in the trail. The default is 134 megabytes, and the maximum is 2000. To allow the ExtractROLLOVERparameter to determine when new files are created, setnumberto a large number, such as 1000 megabytes.
- Example 1
-
This example adds a trail with a maximum size of 300 megabytes.
ADD EXTTRAIL $DATA.GGSDAT.EX, EXTRACT FINANCE, MEGABYTES 300
- Example 2
-
This example adds a trail with the extents set to
10for primary and secondary and16for the maximum.ADD EXTTRAIL $DATA1.EXTDAT.EX, EXTRACT FINANCE, EXTENTS (10,10,16)
Specifying a maximum number of files
Use the MAXFILES num_files option to specify the maximum number of files that can exist in a trail. The default for MAXFILES is 100.
Example
This example adds a trail with a maximum of 20 files.
ADD EXTTRAIL $DATA1.EXTDAT.EX, EXTRACT FINANCE, MAXFILES 20
Specifying security
Specify security measures to restrict access to Oracle GoldenGate trails. If you do not specify security, then the defaults are assumed.
-
Use
OWNERgroup_number,user_numberto specify the NonStop group ID and user ID of the person who started the GGSCI process. -
Use
SECURE "rwep" to specify the default Guardian security attributes (read, write, execute, purge) of the person who started the GGSCI process.
Example
This example specifies a trail that is owned by user 100, 23 and can be read by anyone in the network in group 100.
ADD EXTTRAIL $DATA1.EXTDAT.EX, EXTRACT FINANCE, OWNER 100,23, SECURE "CUUU"
Specifying sequence number
Specify the trail sequence number for the first file in the trail. Do not include any zero padding.
Example
The following example specifies that the first file in the trail will be ex000003.
ADD EXTTRAIL $DATA1.EXTDAT.EX, EXTRACT FINANCE, SEQNO 3
Use SEQNO during troubleshooting when Replicat must be repositioned to a certain trail sequence number. This eliminates the need to alter Replicat to read the required sequence number.
ADD RMTTRAIL
ADD RMTTRAIL creates a remote Oracle GoldenGate trail on a remote system, assigns a maximum size to each file, and associates the file with a particular group. Rolling over from one sequence to the next can be controlled using the maximum size allowed, or by using the EXTRACT ROLLOVER startup parameter or ETROLLOVER option of the GGSCI ALTER EXTRACT command.
In the parameter file, specify a RMTHOST entry before any RMTTRAIL entries to identify the remote system and TCP/IP port.
Syntax
ADD RMTTRAILtrail_name, EXTRACTgroup_name[, MEGABYTESnumber] [, SEQNOnumber]
-
trail_name -
The fully qualified trail name:
$vol.subvol.trail_prefix. Thetrail_prefixmust be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number. Thetrail_namemust have a matching entry in the Replicat parameter file.The name you specify here must be the same name you specify for the
RMTTRAILparameter in the Extract parameter file.Remote trails are used over TCP/IP connections only. Do not use when you are transmitting a trail over Expand even when the remote system is also connected with Expand. To specify a trail on a different NonStop node over an Expand connection, use
ADD. -
EXTRACTgroup_name -
The group to which the
RMTTRAILis bound. Only one group can output extracted data to each trail. -
MEGABYTESnumber -
Optional. The maximum number of megabytes per file in the trail. The default is 30 megabytes and the maximum is 2000. To allow the Extract
ROLLOVERparameter to determine when new files are created, setnumberto a large number, such as 1000 megabytes. -
SEQNOnumber -
Optional. Specifies the trail sequence number for the first file in the trail. Do not include any zero padding. Use
SEQNOduring troubleshooting when Replicat must be repositioned to a certain trail sequence number. It eliminates the need to alter Replicat to read the required sequence number.
Examples
- Example 1
-
The following example illustrates how to add three remote Oracle GoldenGate trails; the first trail residing on UNIX, the second on a Windows platform, and the third on NonStop.
ADD RMTTRAIL /usr/extdat/xx, EXTRACT FINANCE, MEGABYTES 30 ADD RMTTRAIL c:\ggsdat\ex, EXTRACT FINANCE, MEGABYTES 30 ADD RMTTRAIL $DATA.GGSDAT.RT, EXTRACT FINANCE, MEGABYTES 30
- Example 2
-
The following example specifies that the first file in the trail will be
rt000003.ADD RMTTRAIL $DATA1.GGSDAT.RT, EXTRACT FINANCE, SEQNO 3
ALTER EXTTRAIL
Syntax
ALTER EXTTRAILtrail_name, [,options] [, MAXFILESTHRESHOLD num_files]]
-
trail_name -
The fully qualified trail name:
$vol.subvol.trail_prefix. Thetrail_prefixmust be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number. -
options -
ALTERcan be used with the following options:EXTENTS(primary,secondary,maximum) |MEGABYTESnumberMAXFILESnum_filesOWNERgroup_number,user_numberSECURE"rwep"
SEQNOis not a valid option forALTER. -
MAXFILESTHRESHOLD -
MAXFILESTHRESHOLDis the amount files left beforeMAXFILESis about to be reached that are displayed to EMS as critical warnings with emphasis.The default is 2.
The current value can be seen with an info
exttrail <trail_name>.
Example
ALTER $DATA1.EXT1.AA, MAXFILES 50
ALTER RMTTRAIL
ALTER RMTTRAIL changes attributes for an existing RMTTRAIL.
Syntax
ALTER RMTTRAILtrail_name[, MEGABYTESnumber]
-
trail_name -
The fully qualified name of the remote trail: $
vol.subvol.trail_name. A six-digit serial number will be appended to each file in the trail.Remote trails are used over TCP/IP connections only. Do not specify an Expand node name in the
trail_name, even if the remote system is also connected with Expand. To specify a trail on a different NonStop node over an Expand connection, useADD. -
MEGABYTESnumber -
The maximum number of megabytes per file in the trail. The default is 30 megabytes, and the maximum is 2000. To allow the Extract
ROLLOVERparameter to determine when new files are created, setnumberto a large number, such as 1000 megabytes.
DELETE EXTTRAIL
DELETE RMTTRAIL
DELETE RMTTRAIL deletes checkpoints for a particular remote trail. It does not delete the files in the remote trail.
Syntax
DELETE RMTTRAIL trail_name
-
trail_name -
The fully qualified name of the remote Oracle GoldenGate trail as in:
DELETE RMTTRAIL /usr/dat/aa.A six-digit serial number will be appended to each file in the trail.Remote trails are used over TCP/IP connections only. Do not specify an Expand node name in the
trail_name, even if the remote system is also connected with Expand.
INFO RMTTRAIL
Syntax
INFO RMTTRAIL trail_name
-
trail_name -
The name of the Oracle GoldenGate trail.
trail_namemust be a fully qualified file name, as in:INFO RMTTRAIL $DATA6.GGSDAT.BB
Remote trails are used over TCP/IP connections only. Do not specify an Expand node name in the
trail_name, even if the remote system is also connected with Expand. UseINFOinstead.