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.

ASHDUMP for Instance Crash/Hang ‘Post Mortem’ Analysis

Hi guys!
In the last weeks I talked about ASHDUMP in the post HANGANALYZE Part 1. Let’s think about it now…

Imagine the situation: The database is hanging, you cannot find what is going on and decided to restart the database OR your leader/boss yelled to you do it so, OR you know the database is going do get down, anyway…
Everyone has passed by this kind of situation at least once. After restart everything become OK and the ‘problem’ was solved. But now you are being asked about RCA (what caused this situation?). The database was hanging, so no snap was closed and you lost the ASH info…

For this cases I think is very useful to take 1 minute before database get down to generate an ASHDUMP. It’s very simple:

Continue reading

Merry Christmas!

We wish you a Merry Christmas!

Please, copy and paste on any sqlplus window. This is your gift for today:

set heading off;
set pages 5000;
SELECT DECODE(SIGN(FLOOR(maxwidth / 2) - ROWNUM),
              1,
              LPAD(' ', FLOOR(maxwidth / 2) - (ROWNUM - 1)) ||
              RPAD('*', 2 * (ROWNUM - 1) + 1, ' *'),
              LPAD('* * *', FLOOR(maxwidth / 2) + 3))
  FROM all_objects, (SELECT 40 AS maxwidth FROM DUAL)
 WHERE ROWNUM < FLOOR(maxwidth / 2) + 5
union all select '|GrepOra Team Wishes You a Merry Christmas!' from dual;

Surprise!

newscreenshot-2016-12-24-as-16-24-08

Enjoy!

GoldenGate: Replicate data from SQLServer to TERADATA – Part 2

This steps should still be performed in SQLserver Host:

The pump process configuration is very simple, its only function is to transport the trail files to destination.

ADD extract P_MSQL, exttrailsource ./dirdat/tr

C:\goldengate> edit param P_MSQL

extract P_MSQL
SOURCEDB db0sql1, USERID ggate, PASSWORD ??????
CACHEMGR CACHESIZE 2GB
rmthost teradata1.net, mgrport 8809
rmttrail ./dirdat/td

--TABLE MAP
TABLE dbo.DLOG_ERRORS;
TABLE dbo.SAC_DATA;
TABLE dbo.SAC_LIST;
TABLE dbo.SAC_TITLE;

Still in the SQLserver Host, is need to create a definition file, wich will be used in gg-teradata.
First, create a “tables.def” file that should contain a dblogin and tables that will be replicated.

defsfile tables_sqlserver.sql purge 
SOURCEDB db0sql1, 
USERID ggate, PASSWORD ?????? 
TABLE dbo.DLOG_ERRORS; 
TABLE dbo.SAC_DATA; 
TABLE dbo.SAC_LIST; 
TABLE dbo.SAC_TITLE;

Continue reading

HANGANALYZE Part 2

Hi!
See the first part of this post here: HANGANALIZE Part 1.

This post is just complement with a little kludge I liked…
First, let’s remmember that the hanganalyze is used when you are if some hanging in your environment, of course.

But what if you are having difficult to access the database, even with ‘/ as sysdba’?

You can create a ‘preliminary connection’ without create a session, like this:

sqlplus -prelim / as sysdba

This ‘feature’ is available since Oracle 10g, and it basically skips a session creation part (which could block) when logging on as SYSDBA.

Continue reading

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:

Continue reading