Thinking Out Loud

May 4, 2023

Install Healthcheck Script For GoldenGate Integrated MicroService Architecture

Filed under: 19c,GoldenGate — mdinh @ 12:00 am

The installation was a little convoluted since OGG MicroService Architecture (MA) and database reside on differrent host.

For OGG MicroService Architecture (MA), the Healthcheck would be found in $OGG_MA_HOME/lib/sql/healthcheck

Reference: Doc ID 2653026.1

First need to connect to OGG MA to retrieve the following scripts and transfer to DB host:

-rwxr-x---. 1 oracle oinstall 1495789 May  3 10:01 ogghc_install.sql
-rwxr-x---. 1 oracle oinstall    1469 May  3 10:01 ogghc_run.sql
-rwxr-x---. 1 oracle oinstall     912 May  3 10:01 ogghc_uninstall.sql

Here is the fist install as C##GGATE dabase user.

SQL> connect C##GGATE
Enter password:
Connected.
SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> alter session set current_schema=C##GGATE;

Session altered.

SQL> select sys_context('USERENV', 'CURRENT_SCHEMA') from dual;

SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
--------------------------------------------------------------------------------
C##GGATE

SQL> @ogghc_install.sql

NAH! Did not like lack of features when installed as NON-SYS database users.

Let’s remove it.

SQL> connect C##GGATE
Enter password:
Connected.
SQL> show user
USER is "C##GGATE"
SQL> @ogghc_uninstall.sql

Let’s install as SYS in C##GGATE schema.

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.17.0.0.0

SQL> alter session set current_schema=C##GGATE;

Session altered.

SQL> select sys_context ('USERENV','CURRENT_SCHEMA') from dual;

SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
--------------------------------------------------------------------------------
C##GGATE

SQL> show user
USER is "SYS"
SQL> !ls ogg*.sql
ogghc_install.sql  ogghc_run.sql  ogghc_uninstall.sql

SQL> @ogghc_install.sql

Checking installation. This might take a while...

DBMS_GOLDENGATE_HCADM_INT.CHECK_STATS('ALL')
--------------------------------------------------------------------------------

Total Success:261
Total Failure:0

OK...STAT DB Version Range Check.
OK...STAT DB Version Check.
OK...STAT No Duplicates.
OK...STAT Count check (261).
OK...STAT Invalid Objects Count check.
OK...GGHC Objects Count:actual=24:expected=24

PL/SQL procedure successfully completed.

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.17.0.0.0

Advertisement

April 20, 2023

OGG 21c Microservices Vagrant VirtualBox Google Doc

Filed under: GoldenGate — mdinh @ 10:25 pm

https://docs.google.com/document/d/1nJ-0Oo0V4X0u8r3uC3inESgQUh4gCTn6liLhyROZ7ks/edit?usp=sharing

You need to build your own and hope this helps.

Configuring Nginx OEL 7.9 OGG 21c Microservices

Filed under: GoldenGate,OEL7,oracle — mdinh @ 4:16 am

The purpose of configuring Nginx is to avoid having to enter port number for URL on web interface when acessing Microservices web pages.

PORT_ADMINSRVR=1000, PORT_DISTSRVR=10002, PORT_RCVRSRVR=10003, PORT_PMSRVR=10004, UDP_PORT_PMSRVR=10005

Example of having to specify port number.

Just wanted to document the process as I was struggling with nginx.

Don’t forget to enable autostart for when host is rebooted.

I used: baseurl=http://nginx.org/packages/rhel/7/$basearch versus

baseurl=http://nginx.org/packages/mainline/centos/7/$basearch

How to install and use Nginx on CentOS 7 / RHEL 7
[root@localhost ~]# vi /etc/yum.repos.d/nginx.repo
[root@localhost ~]# cat /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/7/$basearch/
gpgcheck=0
enabled=1

[root@localhost ~]# yum install nginx -y

Installed:
  nginx.x86_64 1:1.24.0-1.el7.ngx

Dependency Installed:
  pcre2.x86_64 0:10.23-2.el7

Complete!
[root@localhost ~]#

==================================================	

oracle@localhost::/home/oracle
$ export OGG_HOME=/opt/oracle/goldengate/ogg21c_ma

oracle@localhost::/home/oracle
$ cd $OGG_HOME/lib/utl/reverseproxy

oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy
$ ./ReverseProxySettings -u oggadmin -P X#tpdZdm2wMt -o ogg.conf http://localhost:10000

oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy
$ ls -l ogg.conf
-rw-r--r--. 1 oracle oinstall 73480 Apr 20 02:57 ogg.conf
oracle@localhost::/opt/oracle/goldengate/ogg21c_ma/lib/utl/reverseproxy

[root@localhost ~]# export OGG_HOME=/opt/oracle/goldengate/ogg21c_ma
[root@localhost ~]# cd $OGG_HOME/lib/utl/reverseproxy

[root@localhost reverseproxy]# ls -l ogg.conf
-rw-r--r--. 1 oracle oinstall 73480 Apr 20 02:57 ogg.conf
[root@localhost reverseproxy]# mv -v ogg.conf /etc/nginx/conf.d/
‘ogg.conf’ -> ‘/etc/nginx/conf.d/ogg.conf’
[root@localhost reverseproxy]#

[root@localhost reverseproxy]# /etc/ssl/certs/make-dummy-cert /etc/nginx/ogg.pem
[root@localhost reverseproxy]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@localhost reverseproxy]#

==================================================

[root@localhost reverseproxy]# systemctl status nginx
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: http://nginx.org/en/docs/		
[root@localhost reverseproxy]#

[root@localhost reverseproxy]# systemctl start nginx.service
[root@localhost reverseproxy]# systemctl status nginx
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2023-04-20 03:06:25 UTC; 2s ago
     Docs: http://nginx.org/en/docs/
  Process: 6250 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
 Main PID: 6251 (nginx)
   CGroup: /system.slice/nginx.service
           ├─6251 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           ├─6252 nginx: worker process
           └─6253 nginx: worker process

Apr 20 03:06:25 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
Apr 20 03:06:25 localhost.localdomain systemd[1]: Started nginx - high performance web server.
[root@localhost reverseproxy]#

[root@localhost reverseproxy]# systemctl list-unit-files|grep nginx
nginx-debug.service                           disabled
nginx.service                                 disabled
[root@localhost reverseproxy]#

[root@localhost reverseproxy]# systemctl enable nginx.service
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
[root@localhost reverseproxy]# systemctl list-unit-files|grep nginx
nginx-debug.service                           disabled
nginx.service                                 enabled
[root@localhost reverseproxy]#

[root@localhost reverseproxy]# cat /etc/os-release | grep PRE
PRETTY_NAME="Oracle Linux Server 7.9"
[root@localhost reverseproxy]#

==================================================

$ firefox localhost:443
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL initialize failed (t=12.206) [GFX1-]: glxtest: libEGL initialize failed
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libEGL initialize failed (t=12.206) |[1][GFX1-]: glxtest: libEGL initialize failed (t=12.206) [GFX1-]: glxtest: libEGL initialize failed
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs

==================================================

[root@localhost ~]# curl localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@localhost ~]#

April 18, 2023

Oracle GoldenGate Microservices 21.3.0.0.0 Linux Firefox

Filed under: GoldenGate — mdinh @ 1:11 am

This took too many hours. Now if only I can get port forwarded to desktop.

This shows all the configurations.

April 12, 2023

How To Flashback A BAD DBA?

Filed under: 19c,DataPump,flashback,GoldenGate — mdinh @ 1:07 am

I am working on improving Instantiating Oracle Golden Gate with an Initial Load using Datapump.

There are billions of rows and last import time was 11:18:20 hours with 102 errors ignored.

Following suggestions were made:

TEMPORARILY set db_block_checksum and flashback to OFF
alter system set db_block_checksum=OFF;
alter database flashback OFF;

Got reply:

I prefer not to turn this off. It's our standard so lets try to move on and leave the DB alone for now and focus on the export/import.

Replied back:

Ok – db_block_checksum – will leave as is.
However, flashback should be OFF for import – think about it for a minute and if you still don’t understand then let me know.
Keep in mind keyword: TEMPORARILY

I am hoping the DBA sees the light.

There is no need to have flashback enabled for an Initial Load.

If Initial Load fails, then fix the error and try again.

March 31, 2023

How To Trace GoldenGate To Find Bad Code

Filed under: 19c,GoldenGate — mdinh @ 4:44 am

DBA for client panic after seeing 15:59:15 hours Lag at Chkpt

REPLICAT=XXXXX
GGSCI (xxxxxx07) 3>  info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
REPLICAT    RUNNING     XXXXX       15:59:15      00:00:08  unsure why this one is now behind – non-staging

Without access to the system, I requested following to trace what replicat is doing.

Please run and share results.
REPLICAT=XXXXX

send XXXXX trace2 /tmp/XXXXX.trc
wait for 2 minutes, then turn tracing off:
send XXXXX trace2 off 
Email XXXXX.trc as attachment

Findings is bad coding practices by committing every 10 records.

Unknown – was this recently deployed? What is it doing? This is where development would know.

Was there any code review or BVT (basic validation testing)?

SCHEMA.TABLE_BS count is 26,946,719 rows with AVG row length 27

How did I know there as commit every 10 records?

Trace contains 21,648 lines:
$ wc -l XXXXX.trc
21648 XXXXX.trc

Find occurrences for table from trace:
$ grep -c SCHEMA.TABLE_BS XXXXX.trc
1267
 
Find occurrences for ORA-01403: no data found from trace:
$ grep -c 1403 XXXXX.trc
1632

Find occurrences for successful database updates
$ grep -c "successful database updates" XXXXX.trc
364

Committing every 10 rows.
$ grep "successful database updates" XXXXX.trc|head
15:26:53.745 (3100055) successful database updates 0.253% (execute=7.847,total=3100.044,count=60)
15:26:54.539 (3100848) successful database updates 0.278% (execute=8.641,total=3100.838,count=70)
15:26:55.326 (3101635) successful database updates 0.303% (execute=9.411,total=3101.625,count=80)
15:26:56.119 (3102428) successful database updates 0.328% (execute=10.204,total=3102.417,count=90)
15:26:56.200 (3102509) successful database updates 0.331% (execute=10.285,total=3102.498,count=100)
15:26:56.213 (3102522) successful database updates 0.331% (execute=10.297,total=3102.512,count=110)
15:26:56.219 (3102528) successful database updates 0.332% (execute=10.302,total=3102.517,count=120)
15:26:56.224 (3102533) successful database updates 0.332% (execute=10.306,total=3102.522,count=130)
15:26:56.235 (3102544) successful database updates 0.332% (execute=10.315,total=3102.533,count=140)
15:26:56.240 (3102549) successful database updates 0.332% (execute=10.320,total=3102.539,count=150)

$ grep "successful database updates" XXXXX.trc|tail
15:28:50.482 (3216791) successful database updates 3.841% (execute=123.585,total=3216.781,count=3600)
15:28:50.488 (3216797) successful database updates 3.842% (execute=123.590,total=3216.786,count=3610)
15:28:50.498 (3216807) successful database updates 3.842% (execute=123.597,total=3216.797,count=3620)
15:28:50.504 (3216813) successful database updates 3.842% (execute=123.602,total=3216.802,count=3630)
15:28:50.516 (3216825) successful database updates 3.842% (execute=123.609,total=3216.814,count=3640)
15:28:50.528 (3216837) successful database updates 3.842% (execute=123.619,total=3216.826,count=3650)
15:28:50.536 (3216845) successful database updates 3.843% (execute=123.624,total=3216.835,count=3660)
15:28:50.543 (3216852) successful database updates 3.843% (execute=123.631,total=3216.841,count=3670)
15:28:51.479 (3217788) successful database updates 3.870% (execute=124.556,total=3217.778,count=3680)
15:28:53.212 (3219522) successful database updates 3.922% (execute=126.289,total=3219.511,count=3690)

December 3, 2022

GoldenGate PURGEOLDEXTRACTS

Filed under: GoldenGate — mdinh @ 10:24 pm

There was an issue where GoldenGate trail files consumed 95% of 197G from filesystem.

PURGEOLDEXTRACTS was changed from MINKEEPHOURS 48 to MINKEEPHOURS 20

The above configuration is relative and with increase transactions can still fill up the filesystem.

Why not size the trail file accordingly and keep n trail files?

https://docs.oracle.com/en/middleware/goldengate/core/19.1/reference/purgeoldextracts-manager.html

PURGEOLDEXTRACTS for Manager
MINKEEPFILES n
Keeps at least n trail files, including the active file. The minimum is 1 and the maximum is 100. The default is 1.

File system will never get full because manager will do the clean up.

This is how an extract trail file can be sized when adding.
ADD EXTTRAIL /u09/dirdat/aa EXTRACT e_hawk, MEGABYTES 500

https://docs.oracle.com/en/cloud/paas/goldengate-cloud/gwuad/changing-size-trail-files.html

ALTER EXTTRAIL trail, EXTRACT group, MEGABYTES n
ALTER RMTTRAIL trail, EXTRACT group, MEGABYTES n

When implementing the above, it would be best if trail files reside on a separate mount from GoldenGate Home.

Would you rather have 20 redo logs at 100MB or 10 at 200MB?

There’s no right or wrong. It’s whether the shoe fits or not.

May 21, 2022

Systemd Database GoldenGate Service Start Stop

Filed under: 19c,GoldenGate,linux,OEL7,oracle — mdinh @ 6:13 pm

A complicated solution for a simple process.

If you can’t beat them, join them.

==================================================
### Restart vagrant box:
==================================================

resetlogs@ghost MINGW64 /e/oracle/vagrant-projects/OracleGoldenGate/19.3.0 (main)
$ vagrant halt

resetlogs@ghost MINGW64 /e/oracle/vagrant-projects/OracleGoldenGate/19.3.0 (main)
$ vagrant up

resetlogs@ghost MINGW64 /e/oracle/vagrant-projects/OracleGoldenGate/19.3.0 (main)
$ vagrant ssh

==================================================
### System info and last reboot:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# cat /etc/system-release
Oracle Linux Server release 7.9
[root@oracle-goldengate-1910-vagrant ~]#

[root@oracle-goldengate-1910-vagrant ~]# last reboot|head -1
reboot   system boot  5.4.17-2136.307. Sat May 21 11:01 - 11:02  (00:00)
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Verify goldengate.service started on reboot:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# systemctl status goldengate.service
● goldengate.service - Oracle GoldenGate Manager
   Loaded: loaded (/etc/systemd/system/goldengate.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-05-21 11:02:14 -04; 1min 9s ago
  Process: 4485 ExecStart=/home/oracle/scripts/start_goldengate.sh (code=exited, status=0/SUCCESS)
 Main PID: 4504 (mgr)
   CGroup: /system.slice/goldengate.service
           ├─4504 ./mgr PARAMFILE /u01/ogg/dirprm/mgr.prm REPORTFILE /u01/ogg/dirrpt/MGR.rpt PROCESSID MGR
           └─4522 /u01/ogg/extract PARAMFILE /u01/ogg/dirprm/ext.prm REPORTFILE /u01/ogg/dirrpt/EXT.rpt PROCESSID EXT

May 21 11:02:06 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Manager started.
May 21 11:02:06 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 3> START ER *
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Sending START request to MANAGER ...
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: EXTRACT EXT starting
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 11:02:13 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: MANAGER     RUNNING
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: EXTRACT     RUNNING     EXT         00:01:25      00:00:00
May 21 11:02:14 oracle-goldengate-1910-vagrant systemd[1]: Started Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Check logs for goldengate.service:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# journalctl -u goldengate.service
-- Logs begin at Sat 2022-05-21 11:01:41 -04, end at Sat 2022-05-21 11:03:24 -04. --
May 21 11:02:04 oracle-goldengate-1910-vagrant systemd[1]: Starting Oracle GoldenGate Manager...
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: The Oracle base has been set to /opt/oracle
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Oracle GoldenGate Command Interpreter for Oracle
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Operating system character set identified as UTF-8.
May 21 11:02:04 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
May 21 11:02:05 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 1>
May 21 11:02:05 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 2> START MGR
May 21 11:02:06 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Manager started.
May 21 11:02:06 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 3> START ER *
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Sending START request to MANAGER ...
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: EXTRACT EXT starting
May 21 11:02:07 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 11:02:13 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: MANAGER     RUNNING
May 21 11:02:14 oracle-goldengate-1910-vagrant start_goldengate.sh[4485]: EXTRACT     RUNNING     EXT         00:01:25      00:00:00
May 21 11:02:14 oracle-goldengate-1910-vagrant systemd[1]: Started Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### There is no log from journalctl before reboot:
==================================================

[root@oracle-goldengate-1910-vagrant ~]#  last reboot|head -1
reboot   system boot  5.4.17-2136.307. Sat May 21 11:01 - 11:32  (00:30)
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### NOTICE: Logs begin at Sat 2022-05-21 11:01:41
==================================================

[root@oracle-goldengate-1910-vagrant ~]# journalctl --no-pager|head -2
-- Logs begin at Sat 2022-05-21 11:01:41 -04, end at Sat 2022-05-21 11:30:01 -04. --
May 21 11:01:41 oracle-goldengate-1910-vagrant systemd-journal[151]: Runtime journal is using 8.0M (max allowed 96.8M, trying to leave 145.3M free of 960.7M available → current limit 96.8M).
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### stop_goldengate.sh attempts to gather info:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# ls -alrt /u01/ogg/ggse*
-rw-r-----. 1 oracle oinstall  7835 May 21 11:00 /u01/ogg/ggserr.log.20220521.1100
-rw-r--r--. 1 oracle oinstall   955 May 21 11:00 /u01/ogg/ggserr.log.stop
-rw-r-----. 1 oracle oinstall 10384 May 21 11:02 /u01/ogg/ggserr.log
[root@oracle-goldengate-1910-vagrant ~]#

[root@oracle-goldengate-1910-vagrant ~]# cat /u01/ogg/ggserr.log.stop
2022-05-21T11:00:47.915-0400  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): STOP MGR.
2022-05-21T11:00:47.930-0400  INFO    OGG-00963  Oracle GoldenGate Manager for Oracle, mgr.prm:  Command received from GGSCI on host [127.0.0.1]:58056 (STOP).
2022-05-21T11:00:47.930-0400  WARNING OGG-00938  Oracle GoldenGate Manager for Oracle, mgr.prm:  Manager is stopping at user request.
2022-05-21T11:00:51.934-0400  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): STOP ER *.
2022-05-21T11:00:52.175-0400  INFO    OGG-01021  Oracle GoldenGate Capture for Oracle, ext.prm:  Command received from GGSCI: STOP.
2022-05-21T11:00:52.179-0400  INFO    OGG-00991  Oracle GoldenGate Capture for Oracle, ext.prm:  EXTRACT EXT stopped normally.
2022-05-21T11:00:59.213-0400  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): INFO ALL.
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Continue with demo:
==================================================

==================================================
### Stop goldengate.service using systemctl stop:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# systemctl stop goldengate.service
[root@oracle-goldengate-1910-vagrant ~]# systemctl status goldengate.service
● goldengate.service - Oracle GoldenGate Manager
   Loaded: loaded (/etc/systemd/system/goldengate.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Sat 2022-05-21 11:16:37 -04; 13s ago
  Process: 5432 ExecStop=/home/oracle/scripts/stop_goldengate.sh (code=exited, status=0/SUCCESS)
  Process: 4485 ExecStart=/home/oracle/scripts/start_goldengate.sh (code=exited, status=0/SUCCESS)
 Main PID: 4504 (code=exited, status=0/SUCCESS)

May 21 11:16:28 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Manager stopped.
May 21 11:16:28 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 3> STOP ER *
May 21 11:16:29 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Sending STOP request to EXTRACT EXT ...
May 21 11:16:30 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Request processed.
May 21 11:16:30 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 11:16:36 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: MANAGER     STOPPED
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: EXTRACT     STOPPED     EXT         00:00:00      00:00:07
May 21 11:16:37 oracle-goldengate-1910-vagrant systemd[1]: Stopped Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Check journalctl -u goldengate.service:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# journalctl -u goldengate.service|grep -i stop
May 21 11:16:24 oracle-goldengate-1910-vagrant systemd[1]: Stopping Oracle GoldenGate Manager...
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: The Oracle base has been set to /opt/oracle
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: ‘/u01/ogg/ggserr.log’ -> ‘/u01/ogg/ggserr.log.20220521.1116’
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Oracle GoldenGate Command Interpreter for Oracle
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Operating system character set identified as UTF-8.
May 21 11:16:24 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
May 21 11:16:25 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 1>
May 21 11:16:25 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 2> STOP MGR !
May 21 11:16:26 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Sending STOP request to MANAGER ...
May 21 11:16:26 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Request processed.
May 21 11:16:28 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Manager stopped.
May 21 11:16:28 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 3> STOP ER *
May 21 11:16:29 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Sending STOP request to EXTRACT EXT ...
May 21 11:16:30 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Request processed.
May 21 11:16:30 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 11:16:36 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: MANAGER     STOPPED
May 21 11:16:37 oracle-goldengate-1910-vagrant stop_goldengate.sh[5432]: EXTRACT     STOPPED     EXT         00:00:00      00:00:07
May 21 11:16:37 oracle-goldengate-1910-vagrant systemd[1]: Stopped Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### List ggserr logs:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# ls -alrt /u01/ogg/ggse*
-rw-r-----. 1 oracle oinstall  7835 May 21 11:00 /u01/ogg/ggserr.log.20220521.1100
-rw-r-----. 1 oracle oinstall 10384 May 21 11:16 /u01/ogg/ggserr.log.20220521.1116
-rw-r-----. 1 oracle oinstall   955 May 21 11:16 /u01/ogg/ggserr.log
-rw-r--r--. 1 oracle oinstall   955 May 21 11:16 /u01/ogg/ggserr.log.stop
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Services configured for rdbms and goldengate:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# systemctl list-unit-files|egrep -i 'oracle|gate'
goldengate.service                            enabled
oracle-rdbms.service                          enabled
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### Configuration for goldengate.service:
==================================================

[root@oracle-goldengate-1910-vagrant ~]# ls -l /etc/systemd/system/goldengate.service
-rw-r--r--. 1 root root 713 May 19 23:16 /etc/systemd/system/goldengate.service
[root@oracle-goldengate-1910-vagrant ~]#

[root@oracle-goldengate-1910-vagrant ~]# cat /etc/systemd/system/goldengate.service
[Unit]
Description=Oracle GoldenGate Manager
After=syslog.target network.target
# systemctl list-unit-files|grep -i oracle
After=oracle-rdbms.service

[Service]
Type=forking
RemainAfterExit=yes
KillMode=none
User=oracle
Group=oinstall
TimeoutStopSec=60
TimeoutSec=300
Restart=no

# systemd ignores PAM limits, so set any necessary limits in the service.
# Not really a bug, but a feature.
# https://bugzilla.redhat.com/show_bug.cgi?id=754285
# /etc/security/limits.d/oracle-database-preinstall-19c.conf

LimitMEMLOCK=infinity
LimitNOFILE=131072
LimitNPROC=131072

ExecStart=/home/oracle/scripts/start_goldengate.sh
ExecStop=/home/oracle/scripts/stop_goldengate.sh
Restart=no

[Install]
WantedBy=multi-user.target
[root@oracle-goldengate-1910-vagrant ~]#

==================================================
### GoldenGate processes:
==================================================

oracle@oracle-goldengate-1910-vagrant ogg]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.



GGSCI (oracle-goldengate-1910-vagrant) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EXT         00:00:00      00:00:00


GGSCI (oracle-goldengate-1910-vagrant) 2> info mgr detail

Manager is running (IP port TCP:oracle-goldengate-1910-vagrant.7809, Process ID 5539).


GGSCI (oracle-goldengate-1910-vagrant) 3> info extract *

EXTRACT    EXT       Last Started 2022-05-20 23:31   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Process ID           5546
Log Read Checkpoint  Oracle Integrated Redo Logs
                     2022-05-20 23:35:08
                     SCN 0.3722791 (3722791)


GGSCI (oracle-goldengate-1910-vagrant) 4> exit
[oracle@oracle-goldengate-1910-vagrant ogg]$

==================================================
### start_goldengate.sh & start_goldengate.obey:
==================================================

[oracle@oracle-goldengate-1910-vagrant ~]$ cat /home/oracle/scripts/start_goldengate.sh
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

ORAENV_ASK=NO; ORACLE_SID=ORCLCDB; OGG_HOME=/u01/ogg
. /usr/local/bin/oraenv

$OGG_HOME/ggsci << EOF
  OBEY /home/oracle/scripts/start_goldengate.obey
  exit
EOF
exit
[oracle@oracle-goldengate-1910-vagrant ~]$

[oracle@oracle-goldengate-1910-vagrant ~]$ cat /home/oracle/scripts/start_goldengate.obey
START MGR
START ER *
shell sleep 5
INFO ALL
[oracle@oracle-goldengate-1910-vagrant ~]$

==================================================
### stop_goldengate.sh & stop_goldengate.obey:
==================================================

[oracle@oracle-goldengate-1910-vagrant ~]$ cat /home/oracle/scripts/stop_goldengate.sh
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

ORAENV_ASK=NO; ORACLE_SID=ORCLCDB; OGG_HOME=/u01/ogg
. /usr/local/bin/oraenv

# Rotate existing GGSERR_LOG with append date
GGSERR_LOG=$OGG_HOME/ggserr.log
cp -fv ${GGSERR_LOG%%.*}.{${GGSERR_LOG#*.},${GGSERR_LOG#*.}."$(date +%Y%m%d.%H%M)"}
cat /dev/null > $GGSERR_LOG

$OGG_HOME/ggsci << EOF
  OBEY /home/oracle/scripts/stop_goldengate.obey
  exit
EOF
tail -9 $GGSERR_LOG > $GGSERR_LOG.stop
exit
[oracle@oracle-goldengate-1910-vagrant ~]$

[oracle@oracle-goldengate-1910-vagrant ~]$ cat /home/oracle/scripts/stop_goldengate.obey
STOP MGR !
STOP ER *
shell sleep 5
INFO ALL
[oracle@oracle-goldengate-1910-vagrant ~]$

==================================================
### GoldenGate credential store:
==================================================

GGSCI (oracle-goldengate-1910-vagrant) 1> INFO CREDENTIALSTORE

Reading from credential store:

Default domain: OracleGoldenGate

  Alias: c##ggadmin
  Userid: c##ggadmin@ORCLCDB

GGSCI (oracle-goldengate-1910-vagrant) 2>

==================================================
### GoldenGate mgr.prm:
==================================================

[oracle@oracle-goldengate-1910-vagrant ogg]$ cat dirprm/mgr.prm
PORT 7809
USERIDALIAS c##ggadmin
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 3
AUTOSTART ER *
AUTORESTART ER *, RETRIES 5, WAITMINUTES 2, RESETMINUTES 60
CHECKMINUTES 5
LAGINFOMINUTES 0
LAGCRITICALMINUTES 5
[oracle@oracle-goldengate-1910-vagrant ogg]$

==================================================
### GoldenGate ext.prm:
==================================================

[oracle@oracle-goldengate-1910-vagrant ogg]$ cat dirprm/ext.prm
EXTRACT ext
SETENV (ORACLE_SID = "ORCLCDB")
SETENV (ORACLE_HOME = "/opt/oracle/product/19c/dbhome_1")
USERIDALIAS c##ggadmin
EXTTRAIL ./dirdat/et
GETUPDATEBEFORES
UPDATERECORDFORMAT COMPACT

SOURCECATALOG ORCLPDB1
TABLE ogguser.*;
SEQUENCE ogguser.*;
[oracle@oracle-goldengate-1910-vagrant ogg]$

==================================================
### tnsnames.ora requires (UR=A):
==================================================

ORCLPDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCLPDB1)(UR=A)
    )
  )
  
==================================================
!!! IMPORTANT !!!
==================================================

systemctl is NOT aware when goldengate start/stopp from ggsci!

GGSCI (oracle-goldengate-1910-vagrant) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EXT         00:00:00      00:00:09


GGSCI (oracle-goldengate-1910-vagrant) 2> stop mgr !

Sending STOP request to MANAGER ...
Request processed.
Manager stopped.


GGSCI (oracle-goldengate-1910-vagrant) 3> stop er *

Sending STOP request to EXTRACT EXT ...
Request processed.


GGSCI (oracle-goldengate-1910-vagrant) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
EXTRACT     STOPPED     EXT         00:00:00      00:00:04


GGSCI (oracle-goldengate-1910-vagrant) 5>

==============================

[root@oracle-goldengate-1910-vagrant ~]# systemctl status goldengate.service
● goldengate.service - Oracle GoldenGate Manager
   Loaded: loaded (/etc/systemd/system/goldengate.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sat 2022-05-21 12:00:46 -04; 1min 40s ago
  Process: 5432 ExecStop=/home/oracle/scripts/stop_goldengate.sh (code=exited, status=0/SUCCESS)
  Process: 7921 ExecStart=/home/oracle/scripts/start_goldengate.sh (code=exited, status=0/SUCCESS)
 Main PID: 4504 (code=exited, status=0/SUCCESS)

May 21 12:00:37 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 2> START MGR
May 21 12:00:38 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: MGR is already running.
May 21 12:00:38 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 3> START ER *
May 21 12:00:39 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: EXTRACT EXT is already running.
May 21 12:00:39 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 12:00:45 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: MANAGER     RUNNING
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: EXTRACT     RUNNING     EXT         00:00:00      00:00:00
May 21 12:00:46 oracle-goldengate-1910-vagrant systemd[1]: Started Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

==============================

GGSCI (oracle-goldengate-1910-vagrant) 1> sh date

Sat May 21 12:07:40 -04 2022


GGSCI (oracle-goldengate-1910-vagrant) 2> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
EXTRACT     STOPPED     EXT         00:00:00      00:05:45


GGSCI (oracle-goldengate-1910-vagrant) 3> start mgr
Manager started.


GGSCI (oracle-goldengate-1910-vagrant) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EXT         00:00:00      00:00:03


GGSCI (oracle-goldengate-1910-vagrant) 5>

==============================

[root@oracle-goldengate-1910-vagrant ~]# systemctl status goldengate.service
● goldengate.service - Oracle GoldenGate Manager
   Loaded: loaded (/etc/systemd/system/goldengate.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sat 2022-05-21 12:00:46 -04; 7min ago
  Process: 5432 ExecStop=/home/oracle/scripts/stop_goldengate.sh (code=exited, status=0/SUCCESS)
  Process: 7921 ExecStart=/home/oracle/scripts/start_goldengate.sh (code=exited, status=0/SUCCESS)
 Main PID: 4504 (code=exited, status=0/SUCCESS)

May 21 12:00:37 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 2> START MGR
May 21 12:00:38 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: MGR is already running.
May 21 12:00:38 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 3> START ER *
May 21 12:00:39 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: EXTRACT EXT is already running.
May 21 12:00:39 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 4> shell sleep 5
May 21 12:00:45 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: GGSCI (oracle-goldengate-1910-vagrant) 5> INFO ALL
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: Program     Status      Group       Lag at Chkpt  Time Since Chkpt
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: MANAGER     RUNNING
May 21 12:00:46 oracle-goldengate-1910-vagrant start_goldengate.sh[7921]: EXTRACT     RUNNING     EXT         00:00:00      00:00:00
May 21 12:00:46 oracle-goldengate-1910-vagrant systemd[1]: Started Oracle GoldenGate Manager.
[root@oracle-goldengate-1910-vagrant ~]#

June 3, 2020

GoldenGate – Supplemental Logging Is A Mess

Filed under: 19c,GoldenGate — mdinh @ 3:22 am

I was tasked to find supplemental logging details for Oracle database used with GoldenGate.

Note: this is not a pluggable database.

With ADD TRANDATA, use dba_log_groups and dba_log_group_columns.

With ADD SCHEMATRANDATA, use select * from table(logmnr$always_suplog_columns( SCHEMA, TABLE ));

Basically, one would need to run the query with logmnr pipeline function for all the tables in the schema.

Here is one process I used.

Create info_schematrandata.prm

$ cat info_schematrandata.prm
dblogin USERID ggs, PASSWORD *
info schematrandata *

Run ggsci using info_schematrandata.prm (full path is required)

$ ggsci paramfile /home/oracle/working/dinh/info_schematrandata.prm > info_schematrandata.log

Here is example for results (actual contains 12 schemas)

$ grep -i enable info_schematrandata.log
2020-06-01 05:19:35  INFO    OGG-06480  Schema level supplemental logging, excluding non-validated keys, is enabled on schema "SCOTT".
2020-06-01 05:19:35  INFO    OGG-01981  Schema level supplemental logging is enabled on schema "SCOTT" for all columns.

After finding the schemas, use logmnr pipeline function to find all the details.

select * from table(logmnr$always_suplog_columns('SCOTT','EMP')) order by intcol;
select * from table(logmnr$always_suplog_columns('SCOTT','BONUS')) order by intcol;
select * from table(logmnr$always_suplog_columns('SCOTT','DEPT')) order by intcol;

You can find demo with logmnr$always_suplog_columns at: GoldenGate 12c Features Found in 11.2.1.0.21 ???

References:

OGG: How To Log All Columns With Add Schematrandata To Get NOCOMPRESSUPDATES (Doc ID 1413142.1)

ADD SCHEMATRANDATA does not allow columns to be specified.
This enables logging of Primary Key columns only.
By default, updates are compressed.
In order to log all columns ADD TRANDATA would have to be used.
The ADD TRANDATA can be used in conjunction with ADD SCHEMATRANDATA to specify the non-primary key columns.

How to Check Supplemental Logging When ADD SCHEMATRANDATA is Enabled (Doc ID 1537837.1)

It is not listed in dba_log_groups or dba_log_group_columns.
select * from table(logmnr$always_suplog_columns( SCHEMA, TABLE ));

Effects of ADD TRANDATA and ADD SCHEMATRANDATA on an Oracle databases’ Supplemental Logging (Doc ID 2070331.1)

Some useful commands from ggsci:

INFO TRANDATA [container.]owner.table (info trandata *) did not work
INFO SCHEMATRANDATA schema            (info schematrandata *)
LIST TABLES table                     (list tables SCOTT.*)

Note to self:

$ cat list_table.prm
dblogin USERID ggs, PASSWORD *
list tables SCOTT.*

$ ggsci paramfile /home/oracle/working/dinh/list_table.prm > list_table.log

$ grep '\.' list_table.log | egrep -iv 'found|ggsci'| grep -A 10000 "Successfully logged into database."|grep -v database > table.log

$ cat table.log
SCOTT.EMP
SCOTT.BONUS
SCOTT.DEPT

$ cat read.sh
#!/bin/bash
IFS="."
while read f1 f3
do
echo "select * from table(logmnr\$always_suplog_columns('$f1','$f3')) order by intcol;"
done < /home/oracle/working/dinh/table.log
exit

$ ./read.sh > /tmp/suplog.sql

$ head /tmp/suplog.sql
select * from table(logmnr$always_suplog_columns('SCOTT','EMP')) order by intcol;
select * from table(logmnr$always_suplog_columns('SCOTT','BONUS')) order by intcol;
select * from table(logmnr$always_suplog_columns('SCOTT','DEPT')) order by intcol;

$ cat suplog.sql
set numw 8 lines 200 timing off echo off pages 10000 trimsp on tab off
column NAME_COL_PLUS_SHOW_PARAM format a30
column VALUE_COL_PLUS_SHOW_PARAM format a65 wrap
col owner for a20
col table_name for a20
col column_name for a30
col log_group_type for a20
col column_list for a80
col log_group_name for a30
col table_name for a30
spool Database_Supplemental_Logging_Details.log
pro ******** Database ********
SELECT
name,db_unique_name,open_mode,database_role,remote_archive,switchover_status,dataguard_broker,primary_db_unique_name
FROM v$database
;
pro ******** Database Supplemental Logging ********
SELECT
supplemental_log_data_min MIN,
supplemental_log_data_pk PK,
supplemental_log_data_ui UI,
supplemental_log_data_fk FK,
supplemental_log_data_all "ALL"
FROM v$database
;
pro ******** Table Supplemental Logging ********
pro
pro ******** GoldenGate: ADD TRANDATA ********
SELECT
g.owner, g.table_name, g.log_group_name, g.log_group_type,
DECODE(always,'ALWAYS','Unconditional',NULL,'Conditional') always,
LISTAGG(c.column_name, ', ') WITHIN GROUP (ORDER BY c.POSITION) column_list
FROM dba_log_groups g, dba_log_group_columns c
WHERE g.owner = c.owner(+)
AND g.log_group_name = c.log_group_name(+)
AND g.table_name = c.table_name(+)
GROUP BY g.owner, g.log_group_name, g.table_name, g.log_group_type, DECODE(always,'ALWAYS','Unconditional',NULL,'Conditional')
ORDER BY g.owner, g.log_group_name, g.table_name, g.log_group_type
;
pro ******** Schema Supplemental Logging ********
pro
pro ******** GoldenGate: ADD SCHEMATRANDATA ********
@/tmp/suplog.sql
exit

April 25, 2020

GoldenGate 19.1.0.0.4 Silent Install

Filed under: 19c,GoldenGate,runInstaller — mdinh @ 12:22 am

GoldenGate install is so easy; don’t bother with GUI install.

Download Oracle GoldenGate 19.1.0.0.4 for Oracle on Linux x86-64 : 191004_fbo_ggs_Linux_x64_shiphome.zip

Create copy of response file:

[ggs@db-fs-1 response]$ pwd
/u01/app/oracle/fbo_ggs_Linux_x64_shiphome/Disk1/response

[ggs@db-fs-1 response]$ ls -l
total 12
-rwxr-xr-x 1 ggs oinstall  209 Apr 24 14:07 oggcore_11g_db.rsp
-rwxrwxr-x 1 ggs oinstall 4439 Jan 23  2019 oggcore.rsp
[ggs@db-fs-1 response]$

Create response file for install: just 5 lines and doesn’t get any easier than this.

[ggs@db-fs-1 response]$ cat oggcore_11g_db.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v19_1_0
INSTALL_OPTION=ORA11g
SOFTWARE_LOCATION=/u01/app/ggs
INVENTORY_LOCATION=/u01/app/oraInventory
UNIX_GROUP_NAME=oinstall
[ggs@db-fs-1 response]$

Install Goldengate: (Note: relative path is not supported for response file]

[ggs@db-fs-1 response]$ cd ../
[ggs@db-fs-1 Disk1]$ ls
install  response  runInstaller  stage

[ggs@db-fs-1 Disk1]$ ./runInstaller -silent -showProgress -waitforcompletion -responseFile response/oggcore_11g_db.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 44288 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2047 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-04-24_02-08-58PM. Please wait ...
[FATAL] [INS-10101] The given response file response/oggcore_11g_db.rsp is not found.
CAUSE: The given response file is either not accessible or do not exists.
ACTION: Give a correct response file location. (Note: relative path is not supported)
[ggs@db-fs-1 Disk1]$

[ggs@db-fs-1 Disk1]$ ./runInstaller -silent -showProgress -waitforcompletion -responseFile /tmp/oggcore_11g_db.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 28928 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 17407 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-04-24_02-23-29PM. Please wait ...

You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2020-04-24_02-23-29PM.log

Prepare in progress.
..................................................   10% Done.

Prepare successful.

Copy files in progress.
..................................................   36% Done.
..................................................   54% Done.
..................................................   77% Done.
..................................................   82% Done.
..................................................   88% Done.
....................
Copy files successful.

Link binaries in progress.
..........
Link binaries successful.

Setup files in progress.
..................................................   93% Done.
..................................................   95% Done.
..................................................   96% Done.
..................................................   98% Done.
..................................................   99% Done.

Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.
..................................................   95% Done.
Successfully Setup Software.
..................................................   100% Done.

Finish Setup successful.
The installation of Oracle GoldenGate Core was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2020-04-24_02-23-29PM.log' for more details.
[ggs@db-fs-1 Disk1]$
Next Page »

Blog at WordPress.com.