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:
echo "start mgr" > startGG.obey
GGSCI 1> edit params mgr
AUTOSTART er *
AUTORESTART er *,RETRIES 5,WAITMINUTES 5,RESETMINUTES 30
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:
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),
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;
How to check which ODI repository component/version is created?
SELECT COMP_ID,COMP_NAME,OWNER,VERSION FROM SCHEMA_VERSION_REGISTRY;
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
SOURCEDB db0sql1, USERID ggate, PASSWORD ??????
CACHEMGR CACHESIZE 2GB
rmthost teradata1.net, mgrport 8809
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
USERID ggate, PASSWORD ??????
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.
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:
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:
I realized I have some posts about database hangs but have no posts about hanganalyze, system state or ashdump usage. So let’s fix it. 🙂
To organize the ideas I’m going to split the subject on three posts. This first will be about hanganalyse.
See the second part of this post here: HANGANALIZE Part 2.
Ok, so let me refer the most clear Oracle words I could found:
“Hanganalyze tries to work out who is waiting for who by building wait chains, and then depending on the level will request various processes to dump their errorstack.”
This is very similar to what we can do manually through v$wait_chains. But is quicker and ‘oficial’, so let’s use! 😀
But before I show how you can do it, it’s important to mention that Oracle does not recommend you to use ‘numeric events’ without a SR (MOS), according to Note: 75713.1.
So, how to do it? Basically 2 ways:
1) ALTER SESSION SET EVENTS 'immediate trace name HANGANALYZE level LL'; OR EVENT="60 trace name HANGANALYZE level 5"
2) ORADEBUG hanganalyze LL
Not being able to refresh you Materialized View because of this error?
bamdb> exec dbms_mview.refresh('PROD_ORABAM.MVIEW_TEST','C');
BEGIN dbms_mview.refresh('PROD_ORABAM.MVIEW_TEST','C'); END;
ERROR at line 1:
ORA-00600: internal error code, arguments: [kkzuasid], , , , , , , , , , , 
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2809
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3025
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2994
ORA-06512: at line 1
The bad new is there is no workaround (I usually prefer workaround for this, is quicker and less complicated).
But the good new is there is a patch for this: Patch 17705023 : ORA-600 [KKZUASID] ON MV REFRESH
Since we are arriving at the end of the year, I have taken the mission to replicate data between SQL server and TERADATA. The worst part in this task, is to install and configure a Goldengante in a Windows environment.
Believe, it is not possible to do a Unix installation of goldengate to collect data from SQLserver, goldengate binary needs to be installed on Windows SQLserver host.
After installing the GG binaries, it is good practice to add the MGR as a Windows service:
C:\goldengate> install addevents addservice manualstart
Oracle GoldenGate messages installed successfully.
Service 'GGSMGR' created.
Install program terminated normally.
In order for GG to access the sql database, you need to create a data source (ODBC), and configure a new system DSN (here is db0sql1), and select SQL Server as the database driver.