Thinking Out Loud

January 28, 2017

Goldengate Importance of Commenting

Filed under: GoldenGate — mdinh @ 2:35 am

I was curious to determine effect for modifying ./dirdat/aa to dirdat/aa for Goldengate parameter.

While it may look to be the same, it is not treated the same.

$ ll dirdat/*
-rw-r-----. 1 oracle oinstall    3719 Jan 27 14:15 dirdat/aa000000000
-rw-r-----. 1 oracle oinstall 8086335 Jan 27 18:16 dirdat/aa000000001

$ ll ./dirdat/*
-rw-r-----. 1 oracle oinstall    3719 Jan 27 14:15 ./dirdat/aa000000000
-rw-r-----. 1 oracle oinstall 8086335 Jan 27 18:16 ./dirdat/aa000000001

Here is what happens when parameter is modified from ./dirdat/aa to dirdat/aa

$ grep EXTTRAIL ggserr.log
2017-01-27 10:45:15  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): ADD EXTTRAIL ./dirdat/aa EXTRACT e_hawk, MEGABYTES 500.
2017-01-27 10:45:16  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): ADD EXTRACT p_hawk  EXTTRAILSOURCE ./dirdat/aa.
2017-01-27 18:18:26  ERROR   OGG-01044  Oracle GoldenGate Capture for Oracle, e_hawk.prm:  The trail 'dirdat/aa' is not assigned to extract 'E_HAWK'. 
Assign the trail to the extract with the command "ADD EXTTRAIL/RMTTRAIL dirdat/aa, EXTRACT E_HAWK".

How do you find how trail file as added?

GGSCI (arrow1.localdomain) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     ABENDED     E_HAWK      00:00:04      00:12:25
EXTRACT     STOPPED     P_HAWK      00:00:00      07:44:04


GGSCI (arrow1.localdomain) 2> info e*

EXTRACT    E_HAWK    Last Started 2017-01-27 18:18   Status ABENDED
Checkpoint Lag       00:00:04 (updated 00:12:27 ago)
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2017-01-27 18:16:52
                     SCN 0.3369629 (3369629)


GGSCI (arrow1.localdomain) 3> info e* showch

EXTRACT    E_HAWK    Last Started 2017-01-27 18:18   Status ABENDED
Checkpoint Lag       00:00:04 (updated 00:12:41 ago)
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2017-01-27 18:16:52
                     SCN 0.3369629 (3369629)


Current Checkpoint Detail:

Read Checkpoint #1

  Oracle Integrated Redo Log

  Startup Checkpoint (starting position in the data source):
    Timestamp: 2017-01-27 10:45:14.000000
    SCN: Not available

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Timestamp: 2017-01-27 18:16:52.000000
    SCN: 0.3369628 (3369628)

  Current Checkpoint (position of last record read in the data source):
    Timestamp: 2017-01-27 18:16:52.000000
    SCN: 0.3369629 (3369629)

Write Checkpoint #1

  GGS Log Trail

  Current Checkpoint (current write position):
    Sequence #: 1
    RBA: 8086335
    Timestamp: 2017-01-27 18:16:56.302658
    Extract Trail: ./dirdat/aa
    Seqno Length: 9
    Flip Seqno Length: No
    Trail Type: EXTTRAIL

Header:
  Version = 2
  Record Source = A
  Type = 13
  # Input Checkpoints = 1
  # Output Checkpoints = 1

File Information:
  Block Size = 2048
  Max Blocks = 100
  Record Length = 2048
  Current Offset = 0

Configuration:
  Data Source = 3
  Transaction Integrity = 1
  Task Type = 0

Status:
  Start Time = 2017-01-27 18:18:26
  Last Update Time = 2017-01-27 18:16:56
  Stop Status = A
  Last Result = 520



GGSCI (arrow1.localdomain) 4>

Alternatively, make it easier by commenting parameter files.

$ head dirprm/e_hawk.prm
EXTRACT e_hawk
-- CHECKPARAMS
-- ADD EXTRACT e_hawk, INTEGRATED TRANLOG, BEGIN NOW
-- ADD EXTTRAIL ./dirdat/aa EXTRACT e_hawk, MEGABYTES 500
USERIDALIAS ggs_user
EXTTRAIL ./dirdat/aa
INCLUDE dirprm/global_ggenv.inc
Advertisements

2 Comments »

  1. Hi Michael,

    What version of OGG software you are using?
    I usually identify extract-trail dependencies by using info exttrail command:

    GGSCI (localhost) 1> info exttrail

    Extract Trail: ./dirdat/fa
    Seqno Length: 9
    Flip Seqno Length: no
    Extract: ETESTA
    Seqno: 9
    RBA: 320966775
    File Size: 500M

    Extract Trail: ./dirdat/fc
    Seqno Length: 9
    Flip Seqno Length: no
    Extract: ETESTB
    Seqno: 5
    RBA: 159831532
    File Size: 500M

    Comment by Mikhail Velikikh — January 30, 2017 @ 7:59 am | Reply

  2. Hello Mikhail, You are absolutely correct. Old habits die hard.

    Comment by mdinh — January 31, 2017 @ 12:48 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: