1.6 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.

1.6.1 ADD

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_name

The 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_name

Specifies the Extract group to which the is bound. Only one group can write to an associated trail.

EXTENTS (primary, secondary, maximum) | MEGABYTES number

See "Specifying file size".

MAXFILES num_files

See "Specifying a maximum number of files".

OWNER group_number, user_number SECURE "rwep"

See "Specifying security".

SEQNO number

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"".

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

Example 1   

This example adds a trail with a maximum size of 300 megabytes.

ADD  $DATA.GGSDAT.EX, EXTRACT FINANCE, MEGABYTES 300
Example 2   

This example adds a trail with the extents set to 10 for primary and secondary and 16 for the maximum.

ADD  $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  $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.

1.6.2 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 RMTTRAIL trail_name, EXTRACT group_name 
[, MEGABYTES number]
[, SEQNO number]
trail_name

The 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_name

The group to which the RMTTRAIL is bound. Only one group can output extracted data to each trail.

MEGABYTES number

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 ROLLOVER parameter to determine when new files are created, set number to a large number, such as 1000 megabytes.

SEQNO number

Optional. 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

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

1.6.3 ALTER

ALTER changes attributes for an existing .

Syntax

ALTER  trail_name, [, options]
trail_name

The 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.

options

ALTER can be used with the following options:

  • EXTENTS (primary, secondary, maximum) | MEGABYTES number

  • MAXFILES num_files

  • OWNER group_number, user_number SECURE "rwep"

SEQNO is not a valid option for ALTER .

Example

ALTER  $DATA1.EXT1.AA, MAXFILES 50

1.6.4 ALTER RMTTRAIL

ALTER RMTTRAIL changes attributes for an existing RMTTRAIL.

Syntax

ALTER RMTTRAIL trail_name [, MEGABYTES number]
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, use ADD .

MEGABYTES number

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.

1.6.5 DELETE

DELETE deletes checkpoints for a specified trail. It does not delete the trail or the files in the trail.

Syntax

DELETE  trail_name [!]
trail_name

The fully qualified trail name: $vol.subvol.trail_prefix, or a wildcard specification, as in:

DELETE  $DATA1.EXTDAT.AA
DELETE  *
!

(exclamation point) Deletes trail files associated with each group.

1.6.6 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.

1.6.7 INFO

INFO retrieves configuration information about the trail.

Syntax

INFO  trail_name
trail_name

The fully qualified trail name: $vol.subvol.trail_prefix, or a wildcard specification, as in:

INFO  $DATA1.EXTDAT.AA
INFO  *

1.6.8 INFO RMTTRAIL

INFO RMTTRAIL retrieves configuration information for the remote trail.

Syntax

INFO RMTTRAIL trail_name
trail_name

The 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.