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;

More“GoldenGate: Replicate data from SQLServer to TERADATA – Part 2”

GoldenGate: Replicate data from SQLServer to TERADATA – Part 1

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.

More“GoldenGate: Replicate data from SQLServer to TERADATA – Part 1”

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.

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.

How to sincronize high data volume with GoldenGate – Part II

In the latest post, I documented how to copy/move high table data volume using GoldenGate Initial Load (with SPECIALRUN option).

Sometimes, we (dba/sysadmins) need to move HIGH data (tables with billion rows), in shortest time possible.

So, sharing useful tips, that helps to reach this goal.

Making GoldenGate Initial load work as PARALLEL:

More“How to sincronize high data volume with GoldenGate – Part II”

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

Due to ease in which we can go to the future or return to the past using Goldengate, it becomes increasingly necessary recover archives from backup, sometimes it is necessary to recover a several days.
To do it, generally we need large disk space, at this time, starts a searching for storage disks.

After finding a disk, is need to mount it, i performed with simply mount options in AIX.

More“ORA-27054: NFS file system where the file is created or resides is not mounted with correct options”