I will start a series of blog posts about the new features of GoldenGate 12.2.

This first blog will be concerned by the new parameter ALLOWOUTPUTDIR.

When I tried GoldenGate 12.2 for the first time, I reused the same configuration as with GoldenGate 12.1. It means two virtual machines with OEL 6.5 and Oracle Database 12.1.0.2.4 Enterprise Edition.

First I configured my SCOTT extract process without problems. It was the same for the REPSCOTT replicat process. But when I tried to configure the Data Pump extract process to transfer trail files, I faced an error.

1. Configure Data Pump Extract process

GGSCI (goldengate122) 1> dblogin useridalias ggadmin
Successfully logged into database.

GGSCI (goldengate122 as ggadmin@DB1) 2> add extract DPSCOTT, EXTTRAILSOURCE /u04/app/goldengate/trail/DB1/sc
EXTRACT added.


GGSCI (goldengate122 as ggadmin@DB1) 3> add rmttrail /u05/ggtrail/DB2/tc, extract DPSCOTT
RMTTRAIL added.

GGSCI (goldengate122 as ggadmin@DB1) 4> edit params DPSCOTT



GGSCI (goldengate122 as ggadmin@DB1) 5> view params DPSCOTT

extract dpscott
useridalias ggadmin
DBOPTIONS ALLOWUNUSEDCOLUMN
rmthost 192.168.56.109, MGRPORT 7809
RMTTRAIL /u05/ggtrail/DB2/tc
TABLE scott.emp;


GGSCI (goldengate122 as ggadmin@DB1) 6> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     DPSCOTT     00:00:00      00:01:25
EXTRACT     RUNNING     SCOTT       00:00:10      00:00:03


GGSCI (goldengate122 as ggadmin@DB1) 7> start extract DPSCOTT

Sending START request to MANAGER ...
EXTRACT DPSCOTT starting


GGSCI (goldengate122 as ggadmin@DB1) 8>

It is a standard Data Pump extract.

But when I started it, it always was in status “abended”.

So I checked the error log (ggserr.log) to find the issue and this was reported there:

2015-12-02 09:40:42  INFO    OGG-00993  Oracle GoldenGate Capture for Oracle, dpscott.prm:  EXTRACT DPSCOTT started.
2015-12-02 09:40:44  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.
2015-12-02 09:40:46  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.
2015-12-02 09:40:47  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): info all.
2015-12-02 09:40:47  INFO    OGG-01226  Oracle GoldenGate Capture for Oracle, dpscott.prm:  Socket buffer size set to 27985 (flush size 27985).
2015-12-02 09:40:47  WARNING OGG-06591  Oracle GoldenGate Capture for Oracle, dpscott.prm:  Reading the output trail file /u05/ggtrail/DB2/tb000000 encounters an error from position 0, rescan from the file header to recover.
2015-12-02 09:40:47  ERROR   OGG-01031  Oracle GoldenGate Capture for Oracle, dpscott.prm:  There is a problem in network communication, a remote file problem, encryption keys for target and source do not match (if using ENCRYPT) or an unknown error. (Reply received is Output file /u05/ggtrail/DB2/tc000000 is not in any allowed output directories.).
2015-12-02 09:40:47  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, dpscott.prm:  PROCESS ABENDING.

After some tests and checks with my colleagues I tried to put the remote trail file in the directory ./dirdat/. It is one directory of the GoldenGate home. And oddly now it was good for it.

So the problem is the directory where I tried to put the remote trail files. In the official GoldenGate 12.2 documentation, we found this new parameter ALLOWOUTPUTDIR.

2. Modify the GLOBALS parameter file

Take care, this parameter must be set on the target and not on the source.

GGSCI (goldengate1222) 1> dblogin useridalias ggadmin
Successfully logged into database.

GGSCI (goldengate1222 as ggadmin@DB2) 3> view params ./GLOBALS

GGSCHEMA ggadmin
CHECKPOINTTABLE ggadmin.checkpoint
ALLOWOUTPUTDIR /u05/ggtrail/DB2/


GGSCI (goldengate1222 as ggadmin@DB2) 4>

With this parameter, we can authorize GoldenGate to use a different location than its home to store trail files. If you need different directories for your trails either you use the same root because this parameter includes the sub-directories or you provide the parameter ALLOWOUTPUTDIR several times.

Once the parameter setting is done, I can restart my Data Pump extract and now it works fine.

Conclusion

So we can see that GoldenGate 12.2 doesn’t allow to use all the directories per default like in previous version. Now we must allow GoldenGate explicitly where it is allowed to store the trails.