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.
Use ADD 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 trail_name, EXTRACT group_name [, OWNER group_number, user_number] [, SECURE "rwep"] [, EXTENTS (primary, secondary, maximum) | MEGABYTES number] [, MAXFILES num_files] [, SEQNO number], [, CREATE | NOCREATE]]
trail_nameThe fully qualified trail name: $vol.subvol.trail_prefix. The trail_prefix must be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number. The parameter file for group_name must have a matching trail_name parameter.
EXTRACT group_nameSpecifies the Extract group to which the is bound. Only one group can write to an associated trail.
EXTENTS (primary, secondary, maximum) | MEGABYTES numberSee "Specifying file size".
MAXFILES num_filesOWNER group_number, user_number SECURE "rwep"See "Specifying security".
SEQNO numberSee "Specifying sequence number".
See Ongoing Trail Managementfor more information on managing trails.
CREATE | NOCREATETo specify whether the file is created, see "Using a Local Oracle GoldenGate Trail"".
Specifying file size
Control file size with one of the following options:
Use the EXTENTS primary, secondary, maximum option to specify extent sizes for individual trails. Default extent sizes are 64, 128 and 512.
Use the MEGABYTES number option 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 Extract ROLLOVER parameter to determine when new files are created, set number to a large number, such as 1000 megabytes.
Examples
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 $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, the defaults are assumed.
Use OWNER group_number, user_number to 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 $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 $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 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 RMTTRAIL trail_name, EXTRACT group_name [, MEGABYTES number] [, SEQNO number]
trail_nameThe fully qualified trail name: $vol.subvol.trail_prefix. The trail_prefix must be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number. The trail_name must have a matching entry in the Replicat parameter file.
The name you specify here must be the same name you specify for the RMTTRAIL parameter 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 .
EXTRACT group_nameThe group to which the RMTTRAIL is bound. Only one group can output extracted data to each trail.
MEGABYTES numberOptional. The maximum number of megabytes per file in the trail. The default is 30 megabytes and the maximum is 2000. To allow the Extract ROLLOVER parameter to determine when new files are created, set number to a large number, such as 1000 megabytes.
SEQNO numberOptional. Specifies the trail sequence number for the first file in the trail. Do not include any zero padding. Use SEQNO during 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
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
The following example specifies that the first file in the trail will be rt000003.
ADD RMTTRAIL $DATA1.GGSDAT.RT, EXTRACT FINANCE, SEQNO 3
Syntax
ALTER trail_name, [, options]
trail_nameThe fully qualified trail name: $vol.subvol.trail_prefix. The trail_prefix must be two characters long. Each file in the trail is automatically identified by the prefix and a six-digit serial number.
optionsALTER can be used with the following options:
SEQNO is not a valid option for ALTER .
Example
ALTER $DATA1.EXT1.AA, MAXFILES 50
ALTER RMTTRAIL changes attributes for an existing RMTTRAIL.
Syntax
ALTER RMTTRAIL trail_name [, MEGABYTES number]
trail_nameThe 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, use ADD .
MEGABYTES numberThe maximum number of megabytes per file in the trail. The default is 30 megabytes, and the maximum is 2000. To allow the Extract ROLLOVER parameter to determine when new files are created, set number to a large number, such as 1000 megabytes.
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_nameThe 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.
Syntax
INFO RMTTRAIL trail_name
trail_nameThe name of the Oracle GoldenGate trail. trail_name must 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. Use INFO instead.