Auto start GoldenGate

How to autostart GoldenGate services after system startup?

On Linux: /etc/rc.local

#Auto start GoldenGate 
su - oracle -c "/oracle/goldengate/./ggsci paramfile startGG.obey"

On GoldenGate ggsci path, create follow file:

cd /oracle/goldengate/
echo "start mgr" > startGG.obey
./ggsci
GGSCI  1> edit params mgr
--Startup  MGR
AUTOSTART er *
AUTORESTART er *,RETRIES 5,WAITMINUTES 5,RESETMINUTES 30

Maiquel.

ODI – Import(ANT) Modes

Oracle introduce in Data Integrator 12c an spectacular way to avoid object duplication (10g/11g users will bad remember)

With “Global ID”, ODI repository will generate special HASH to each object created on the repository (sometimes it will be updated).

This internal ID should be available on “Version” tab as below:important_modes

So, why this global id makes sense?

According oracle docs, “read carefully this section in order to determine the import mode you need.”

Changing ODI import modes, will be able to import/customize duplicated objects, generated by devops scripts.

Let’s understand the Import Modes:

More“ODI – Import(ANT) Modes”

GoldenGate Integrated Capture and Integrated Replicat Healthcheck Script

GoldenGate integrated Extract gives to dbas powerful tool to check GoldenGate’s operation in database, this package can  be found to download on Doc ID 1448324.1.

This Healthcheck is similar AWR reports and it been very useful to find some error or bottleneck.

Tool give some advices and parameter tips.

Let’s check my lab HC topics

Environment overview:lab1

Performance tips:

tip-2

tip-1

This HC uses system views created by OGG, so you can customize you own HC 🙂

Maiquel.

Skipping database transaction on Oracle GoldenGate

Sometimes GoldenGate EXTRACT capture long transactions from database and could be some B.O.F.H making DUMMY, if it’s the case, it’s a ‘UNWANTED’ transaction, and can skip it on ggsci:

(GUARANTEED DATA LOSS – db transaction skipped)

GGSCI (cloud-db) 60> send ext2 showtrans

Sending SHOWTRANS request to EXTRACT EXT2 ...

Oldest redo log files necessary to restart Extract are:

Redo Thread 1, Redo Log Sequence Number 20322, SCN 1661.3085726936 (7137026405592), RBA 597023248
------------------------------------------------------------
XID:                  2049.13.3951869
Items:                1
Extract:              EXT2
Redo Thread:          1
Start Time:           2016-11-07:15:22:07
SCN:                  1661.3085726936 (7137026405592)
Redo Seq:             20322
Redo RBA:             597023248
Status:               Running
------------------------------------------------------------
 
GGSCI (cloud-db) 62> send ext2 SKIPTRANS 2049.13.3951869  THREAD 1

Sending SKIPTRANS request to EXTRACT EXT2 ...

Are you sure you sure you want to skip transaction [XID 2049.13.3951869, Redo Thread 1, Start Time 2016-11-07:15:22:07, SCN 1661.3085726936 (7137026405592)]? (y/n)y

Sending SKIPTRANS request to EXTRACT EXT2 ...

Transaction [XID 2049.13.3951869, Redo Thread 1, Start Time 2016-11-07:15:22:07, SCN 1661.3085726936 (7137026405592)] skipped.

Check your applications and kill it in the database 🙂

Maiquel.

grepOra around the world!

This first #GrepOra year had 96 different nationalities access our blog website. It make me very proud to see too many flags in our logs (I’d like this in my passport log history).

I would like wish cheers grepora readers.

Parabéns! Feliz cumpleaños, Happy birthday, Alles gute zum Geburstag!! 🙂around-the-world-2015

IN 2015/2016 we accomplished spectacular goals.

goals-2016

If you are interested in our topics, please subscribe us.

We are planning interested things in 2017 .

pink-and-braim-around-the-world

OGG-01224 Oracle GoldenGate Command Interpreter for Oracle: Bad file number

I checked strange coincidence during GoldenGate Director monitoring failure and GoldenGate Manager messages.

During GoldenGate operation, it append never-ending failure messages bellow, however, none GoldenGate proccess change to “ABBENDED” status

2016-10-26 08:47:28 ERROR OGG-01224 Oracle GoldenGate Command Interpreter for Oracle: Bad file number.
2016-10-26 08:47:29 ERROR OGG-01668 Oracle GoldenGate Command Interpreter for Oracle: PROCESS ABENDING.

It’s caused by GoldenGate logfile size ( ggserr.log), so correct with this:

grepora-gg@machine oracle$ cp ggserr.log ggserr.log-err-temp-log && > ggserr.log

It good idea stop manager proccess (if it’s possible) before truncate log file.

Keep this in mind 😉
Maiquel.

How to find GoldenGate recovery time

Sometimes it’s necessary to restart GoldenGate process, and after start GG Extract, it take’s long time ‘in recovery’ status.

It’ a interesting subject, and can be found here (before read below  🙂 ) .

GGSCI (greporagg) 16> send EXT status
EXTRACT EXT (PID 23068830)
  Current status: In recovery[1]: Processing data

  Current read position:
  Redo thread #: 2
  Sequence #: 4246
  RBA: 223285824
  Timestamp: 2016-10-08 07:32:36.000000
  SCN: 1658.1839128718
  Current write position:
  Sequence #: 29295
  RBA: 74336127
  Timestamp: 2016-10-14 17:59:43.476624
  Extract Trail: ./dirdat/TR

So let’s check how to find transaction:

GGSCI (greporagg) 17> send EXT showtrans

Sending SHOWTRANS request to EXTRACT EXT ...

------------------------------------------------------------
XID: 783.27.1959817
Items: 0
Extract: EXT
Redo Thread: 4
Start Time: 2016-10-08:07:33:51
SCN: 1658.1839293825 (7122895070593)
Redo Seq: 3388
Redo RBA: 224131088
Status: Running
------------------------------------------------------------

In database (dark) side:

SQL> select s.sid
  ,s.serial#
  ,s.username
  ,s.machine
  ,s.status
  ,s.lockwait
  ,t.used_ublk
  ,t.used_urec
  ,t.start_time
  ,t.XIDUSN
  ,t.XIDSLOT
  ,t.XIDSQN
  from gv$transaction t
  inner join gv$session s on t.addr = s.taddr
  order by start_time asc;

Maiquel.