Saturday 22 June 2019

how to configure AES cypher keys using wallet method in 12c GG


1] Login to oracle user.

2] connect golden gate prompt.

./ggsci

3] Open oracle wallet

GGSCI (source.example.com) 8> OPEN WALLET
Opened wallet at location 'dirwlt'.
GGSCI (source.example.com) 9> ADD MASTERKEY
Master key 'OGG_DEFAULT_MASTERKEY' added to wallet at location 'dirwlt'.

GGSCI (source.example.com) 10> INFO MASTERKEY
Masterkey Name:                 OGG_DEFAULT_MASTERKEY
Creation Date:                  Sat Jun 22 07:29:55 2019

Version:        Creation Date:                  Status:
1               Sat Jun 22 07:29:55 2019        Current

GGSCI (source.example.com) 11> INFO MASTERKEY VERSION 1
Masterkey Name:                 OGG_DEFAULT_MASTERKEY
Creation Date:                  Sat Jun 22 07:29:55 2019
Version:                        1
Renew Date:                     Sat Jun 22 07:29:55 2019
Status:                         Current
Key Hash (SHA1):                0xC683C5495E86196C25B316664BD91EFB1E15A200

GGSCI (source.example.com) 12> exit

4] Copy wallet file to remote server.

GGSCI (source.example.com) 12> exit
[oracle@source ggs]$ cd dirwlt
[oracle@source dirwlt]$ ls -ltr
total 4
-rw-r-----. 1 oracle oinstall 685 Jun 22 07:29 cwallet.sso
[oracle@source dirwlt]$ pwd
/u01/ggs/dirwlt
[oracle@source dirwlt]$ scp cwallet.sso oracle@target.example.com:/u01/ggs/dirwlt/.
The authenticity of host 'target.example.com (192.*.*.190)' can't be established.
ECDSA key fingerprint is SHA256:kUZS1JE7C6Oaseh72HegtiXt9z8NfG7DJsKlimwq0/Y.
ECDSA key fingerprint is MD5:08:1d:34:97:6c:6c:d6:de:7b:57:e1:02:ca:6b:6f:5f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'target.example.com,192.*.*.190' (ECDSA) to the list of known hosts.
oracle@target.example.com's password:
cwallet.sso                                                  100%  685    38.4KB/s   00:00
[oracle@source dirwlt]$ cd ..

5] Add the ENCRYPT and KEYNAME parameters to RMTHOST in the data pump parameter file.

RMTHOST target.example.com, MGRPORT 7809, ENCRYPT AES192

6] Stop and restart the Extract process

12c golden gate one direction replication using integrated extract



OS Details:
[oracle@target ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[oracle@target ~]$
Node Name:
target.example.com                 ----------Target database server host name
source.example.com                -------- Source database server host name

Database Name:
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

GG Details:
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.

Step: - Preparing the database for GG (Source database)

A] Database should be in archive Mode.

B] Enable supplemental logging

sql> alter database add supplemental log data;
sql> alter database force logging;
sql> select supplemental_log_data_min, force_logging from v$database;
sql> alter system switch logfile;

C] Create golden gate Admin user

sql> create tablespce GG_user datafile '/u01/app/oracle/oradata/DB11G/ggsample01.dbf' size 1GB;
sql> create user ggadmin identified by 'passwrod' default tablespace GG_user;
sql> grant connect,resource,DBA to ggadmin;
sql> exec dbms_goldengate_auth.grant_admin_privilege('ggadmin');
sql> grant flashback any table to ggadmin;

Step: - Add tns entry both database (target/source) in each tnsname.ora

Step: - create wallet and credentialstore (source and target database)

Connect GG prompt: (source database)

 GGSCI (source.example.com)> create wallet
 GGSCI (source.example.com)> add credentialstore
 GGSCI (source.example.com)> alter credentialstore add user ggadmin@srcdb alias srcdb domain admin
 (Enter your password) 
 GGSCI (source.example.com)> info credentailstore domain admin



Connect GG prompt: (target database)

 GGSCI (target.example.com)> create wallet
 GGSCI (target.example.com)> add credentialstore
 GGSCI (target.example.com)> alter credentialstore add user      ggadmin@trgdb alias trgdb domain admin
 (Enter your password) 
 GGSCI (target.example.com)> info credentailstore domain admin

Step:- enable supplemental logging to source database.

GGSCI (target.example.com) 10> dblogin userid ggadmin@trgdb password ******
Successfully logged into database.

GGSCI (target.example.com as ggadmin@DB11G) 11> add trandata hr.*

Logging of supplemental redo log data is already enabled for table HR.COUNTRIES.
TRANDATA for instantiation CSN has been added on table 'HR.COUNTRIES'.
Logging of supplemental redo log data is already enabled for table HR.DEPARTMENTS.
TRANDATA for instantiation CSN has been added on table 'HR.DEPARTMENTS'.
Logging of supplemental redo log data is already enabled for table HR.EMPLOYEES.
TRANDATA for instantiation CSN has been added on table 'HR.EMPLOYEES'.
Logging of supplemental redo log data is already enabled for table HR.JOBS.
TRANDATA for instantiation CSN has been added on table 'HR.JOBS'.
Logging of supplemental redo log data is already enabled for table HR.JOB_HISTORY.
TRANDATA for instantiation CSN has been added on table 'HR.JOB_HISTORY'.
Logging of supplemental redo log data is already enabled for table HR.LOCATIONS.
TRANDATA for instantiation CSN has been added on table 'HR.LOCATIONS'.
Logging of supplemental redo log data is already enabled for table HR.REGIONS.
TRANDATA for instantiation CSN has been added on table 'HR.REGIONS'.
GGSCI (source.example.com as ggadmin@DB11G) 12> redo data enabled for table hr.*
ERROR: Invalid command.
GGSCI (target.example.com as ggadmin@DB11G) 13> redo data enabled for table hr.*
ERROR: Invalid command.

Step: - Preparing the database for GG (target database)

A] Create goldengate Admin user:

sql> create tablespce GG_user  add datafile '/u01/app/oracle/oradata/DB11G/ggsample01.dbf' size 1GB;
sql> create user ggadmin identified by 'passwrod' default tablespace GG_user;
sql> grant connect,resource,DBA to ggadmin;
sql> exec dbms_goldengate_auth.grant_admin_privilege('ggadmin');
sql> grant flashback any table to ggadmin;
sql> alter system set enable_goldengate_replicate=true  scope=both;

Step:- configure manager process on both source and target server:

GGSCI (source.example.com) 1> edit param mgr
PORT 7809
PURGEOLDEXTRACTS ./dirdat/aa*, USECHECKPOINTS, MINKEEPHOURS 2

GGSCI (source.example.com) 2> start mgr


Step:- configure capture process

GGSCI (source.example.com) 3> edit param EXTRACT0
 (Add below parameter to extract par file)

-- Change Data Capture parameter file to extract
-- source table changes
EXTRACT extract0
SETENV (ORACLE_HOME = "/u01/app/oracle/product/11.2.0.4/db_1")
SETENV (ORACLE_SID="DB11G")
USERIDALIAS srcdb DOMAIN admin
TRANLOGOPTIONS NOUSENATIVEOBJSUPPORT
EXTTRAIL /u01/ggs/dirdat/rx
TABLE hr.departments;
DISCARDFILE /u01/ggs/dirrpt/hr.dsc, APPEND, Megabytes 100
DISCARDROLLOVER AT 04:30 ON friday

Step:- create capture process

GGSCI (source.example.com as ggadmin@DB11G) 7> add extract EXTRACT0, integrated tranlog, begin now
EXTRACT (Integrated) added.

GGSCI (source.example.com as ggadmin@DB11G) 8> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     EXTRACT0    00:00:00      00:00:05

GGSCI (source.example.com as ggadmin@DB11G) 11> add exttrail /u01/ggs/dirdat/rx, extract EXTRACT0, megabytes 100
EXTTRAIL added.

Step:- register capture process to 11g database:

GGSCI (source.example.com) 10> dblogin userid ggadmin@srcdb password ******
Successfully logged into database.

GGSCI (source.example.com as ggadmin@DB11G) 13> register extract extract0 database;

Step:- configure Data pump process

GGSCI (source.example.com) 4> edit param DATAPMP0
(Add below paramter to datapump par file)

EXTRACT datapmp0
SETENV (ORACLE_HOME = "/u01/app/oracle/product/11.2.0.4/db_1")
SETENV (ORACLE_SID="DB11G")
USERIDALIAS srcdb DOMAIN admin
RMTHOST target.example.com, MGRPORT 7809
RMTTRAIL /u01/ggs/dirdat/tx
TABLE hr.departments;


Step:- create data pump process

GGSCI (source.example.com as ggadmin@DB11G) 15> add extract DATAPMP0, exttrailsource /u01/ggs/dirdat/rx begin now
EXTRACT added.

GGSCI (source.example.com as ggadmin@DB11G) 17> add rmttrail /u01/ggs/dirdat/tx extract DATAPMP0
RMTTRAIL added.

GGSCI (source.example.com as ggadmin@DB11G) 18> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     DATAPMP0    00:00:00      00:01:33
EXTRACT     STOPPED     EXTRACT0    00:00:00      00:09:18

Step:- start extract and data pump process.

GGSCI (source.example.com) 2> start extract EXTRACT0

Sending START request to MANAGER ...
EXTRACT EXTRACT0 starting

GGSCI (source.example.com) 25> start extract DATAPMP0

Sending START request to MANAGER ...
EXTRACT DATAPMP0 starting

GGSCI (source.example.com) 26> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DATAPMP0    00:00:00      00:28:42
EXTRACT     RUNNING     EXTRACT0    00:00:09      00:00:05

Step:- configure replicat process(target Database)

GGSCI (target.example.com) 2> edit param REPLCAT0
(Add below paramter to replicat par file)

-- Replicator parameter file to apply changes
-- to tables
--
REPLICAT replcat0
SETENV (ORACLE_HOME = "/u01/app/oracle/product/11.2.0.4/db_1")
SETENV (ORACLE_SID="DB11G")
USERIDALIAS trgdb DOMAIN admin
DISCARDFILE /u01/ggs/dirdsc/replcat0.dsc, PURGE
ASSUMETARGETDEFS
MAP hr.departments TARGET hr.departments;

==> start replicate process:

GGSCI (target.example.com as ggadmin@DB11G) 16> add replicat replcat0 integrated exttrail /u01/ggs.12.2.0.2/dirdat/tx

GGSCI (target.example.com as ggadmin@DB11G) 16> start replicat REPLCAT0

Sending START request to MANAGER ...
REPLICAT REPLCAT0 starting


GGSCI (target.example.com as ggadmin@DB11G) 17> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     REPLCAT0    00:00:00      00:01:35

===========check GG Replication setup====

==> Source Database

SQL> conn hr/hr   
Connected.
SQL> insert into departments values(277,'Marketing',null,1700);
1 row created.
SQL> commit;
Commit complete.

oracle@source ggs]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Operating system character set identified as UTF-8.

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



GGSCI (source.example.com) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DATAPMP0    00:00:00      00:00:07
EXTRACT     RUNNING     EXTRACT0    00:00:04      00:00:05


GGSCI (source.example.com) 2> stats EXTRACT0

Sending STATS request to EXTRACT EXTRACT0 ...

Start of Statistics at 2019-06-22 02:36:24.

Output to /u01/ggs/dirdat/rx:

Extracting from HR.DEPARTMENTS to HR.DEPARTMENTS:

*** Total statistics since 2019-06-22 02:36:04 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Daily statistics since 2019-06-22 02:36:04 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Hourly statistics since 2019-06-22 02:36:04 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Latest statistics since 2019-06-22 02:36:04 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

End of Statistics.

==> Target Database

GGSCI (target.example.com as ggadmin@DB11G) 19> stats REPLCAT0

Sending STATS request to REPLICAT REPLCAT0 ...

Start of Statistics at 2019-06-22 02:36:42.

Integrated Replicat Statistics:

        Total transactions                                 1.00
        Redirected                                         0.00
        DDL operations                                     0.00
        Stored procedures                                  0.00
        Datatype functionality                             0.00
        Event actions                                      0.00
        Direct transactions ratio                          0.00%

Replicating from HR.DEPARTMENTS to HR.DEPARTMENTS:

*** Total statistics since 2019-06-22 02:36:10 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Daily statistics since 2019-06-22 02:36:10 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Hourly statistics since 2019-06-22 02:36:10 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

*** Latest statistics since 2019-06-22 02:36:10 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

End of Statistics.

==> Validation from database (target database)

SQL> select * from departments;

DEPARTMENT_ID DEPARTMENT_NAME                MANAGER_ID LOCATION_ID
------------- ------------------------------ ---------- -----------
          230 IT Helpdesk                                      1700
          240 Government Sales                                 1700
          250 Retail Sales                                     1700
          260 Recruiting                                       1700
          270 Payroll                                          1700
          277 Marketing                                        1700






Saturday 15 June 2019

replicate not started due to OGG-02091


GGSCI (target.example.com) 14> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    ABENDED     REPLCAT1    00:00:00      00:11:15


Error: 

2019-06-15 07:38:24  ERROR   OGG-02091  Operation not supported because enable_goldengate_repli
cation is not set to true.

2019-06-15 07:38:24  ERROR   OGG-01668  PROCESS ABENDING.


Solution:

SQL> show parameter enable_goldengate_replication

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication        boolean     FALSE
SQL> alter system set enable_goldengate_replication=true scope=spfile;

System altered.

SQL> show parameter enable_goldengate_replication

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication        boolean     TRUE
SQL>

GSCI (target.example.com) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     REPLCAT1    00:00:00      00:00:00


WARNING OGG-02901 Replication of UDT and ANYDATA from redo logs



warning Details: 

WARNING OGG-02901  Replication of UDT and ANYDATA from redo logs is not su
pported with the Oracle compatible parameter setting. Using fetch instead.

Solution: 

Add below parameter to extract process

TRANLOGOPTIONS NOUSENATIVEOBJSUPPORT

==> stop and start extract process:

GGSCI (source.example.com) 23> view report EXTRACT1


***********************************************************************
                 Oracle GoldenGate Capture for Oracle
    Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
   Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 01:10:08

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


                    Starting at 2019-06-15 07:02:49
***********************************************************************

Operating System Version:
Linux
Version #2 SMP Mon Sep 24 14:45:01 PDT 2018, Release 4.14.35-1818.3.3.el7uek.x86_64
Node: source.example.com
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited

Process id: 13653

Description:

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************

2019-06-15 07:02:49  INFO    OGG-03059  Operating system character set identified as UTF-8.

2019-06-15 07:02:49  INFO    OGG-02695  ANSI SQL parameter syntax is used for parameter parsing
.
EXTRACT extract1
USERIDALIAS srcdb DOMAIN admin

2019-06-15 07:02:50  INFO    OGG-03522  Setting session time zone to source database time zone
'GMT'.
TRANLOGOPTIONS NOUSENATIVEOBJSUPPORT
EXTTRAIL ./dirdat/aa
TABLE hr.EMPLOYEES;
TABLE hr.DEPARTMENTS;

2019-06-15 07:02:50  INFO    OGG-01815  Virtual Memory Facilities for: BR
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /u01/ggs/BR/EXTRACT1.

Bounded Recovery Parameter:
BRINTERVAL = 4HOURS
BRDIR      = /u01/ggs

2019-06-15 07:02:50  INFO    OGG-01851  filecaching started: thread ID: 139794004834048.

2019-06-15 07:02:50  INFO    OGG-01815  Virtual Memory Facilities for: COM
    anon alloc: mmap(MAP_ANON)  anon free: munmap
    file alloc: mmap(MAP_SHARED)  file free: munmap
    target directories:
    /u01/ggs/dirtmp.

CACHEMGR virtual memory values (may have been adjusted)
CACHEPAGEOUTSIZE (default):               8M
PROCESS VM AVAIL FROM OS (min):         128G
CACHESIZEMAX (strict force to disk):     96G

Database Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

Database Language and Character Set:
NLS_LANGUAGE     = "AMERICAN"
NLS_TERRITORY    = "AMERICA"
NLS_CHARACTERSET = "WE8MSWIN1252"

2019-06-15 07:02:51  INFO    OGG-02248  Logmining server DDL filtering enabled.

2019-06-15 07:02:53  INFO    OGG-02068  Integrated capture successfully attached to logmining s
erver OGG$CAP_EXTRACT1 using OGGCapture API.

2019-06-15 07:02:53  INFO    OGG-02089  Source redo compatibility version is: 11.2.0.4.0.

2019-06-15 07:02:53  INFO    OGG-02086  Integrated Dictionary will be used.

2019-06-15 07:02:53  INFO    OGG-01055  Recovery initialization completed for target file ./dir
dat/aa000000003, at RBA 1474.

2019-06-15 07:02:53  INFO    OGG-01478  Output file ./dirdat/aa is using format RELEASE 12.2.

2019-06-15 07:02:53  INFO    OGG-01026  Rolling over remote file ./dirdat/aa000000003.

2019-06-15 07:02:53  INFO    OGG-01053  Recovery completed for target file ./dirdat/aa000000004
, at RBA 1474.

2019-06-15 07:02:53  INFO    OGG-01057  Recovery completed for all targets.

***********************************************************************
**                     Run Time Messages                             **
***********************************************************************


WARNING OGG-02045 DB does not have streams_pool_size initialization parameter.


WARNING:

2019-06-15 06:40:03  WARNING OGG-02045  Database does not have streams_pool_size initialization
 parameter configured.

Solution :

set streams_pool_size:

SQL> show parameter streams_pool_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size                    big integer 0

---set paramter as per the system: 

SQL> alter system set streams_pool_size=1G scope=spfile;   

System altered.


OGG-02912 Patch 17030189 is required on your Oracle mining databa se


Error Details:

ERROR OGG-02912 Patch 17030189 is required on your Oracle mining databa
se for trail format RELEASE 12.2 or later.

Solution:

==> Got to GG_HOME:
==> Login to database and execute below script

[oracle@source ggs]$ cd /u01/ggs
[oracle@source ggs]$ ls -ltr prvtlmpg.plb
-rw-r-----. 1 oracle oinstall 9487 May 27 2015 prvtlmpg.plb

[oracle@source ggs]$ sqlplus
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 15 06:04:29 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @prvtlmpg.plb

Oracle GoldenGate Workaround prvtlmpg
This script provides a temporary workaround for bug 17030189.
It is strongly recommended that you apply the official Oracle
Patch for bug 17030189 from My Oracle Support instead of using
this workaround.
This script must be executed in the mining database of Integrated
Capture. You will be prompted for the username of the mining user.
Use a double quoted identifier if the username is case sensitive
or contains special characters. In a CDB environment, this script
must be executed from the CDB$ROOT container and the mining user
must be a common user.
=========================== WARNING ==========================
You MUST stop all Integrated Captures that belong to this mining
user before proceeding!
================================================================
Enter Integrated Capture mining user: ggadmin
Installing workaround...
No errors.
No errors.
No errors.
Installation completed.
SQL> !pwd
/u01/ggs
SQL> exit

==> start extract process:

GGSCI (source.example.com) 2> start extract DATAPMP1

Sending START request to MANAGER ...
EXTRACT DATAPMP1 starting


GGSCI (source.example.com) 3> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DATAPMP1    00:00:00      00:00:00
EXTRACT     RUNNING     EXTRACT1    00:00:05      00:00:00

Friday 14 June 2019

OGG-02060 The Oracle mining database is not configured properly to support integrated capture

GGSCI (source.example.com as ggadmin@DB11G) 22> register extract extract1 database
2019-06-15 01:25:58 ERROR OGG-02060 The Oracle mining database is not configured properly to support integrated capture. The following configuration error must be fixed: Operation not supported because enable_goldengate_replication is not set to true.

==> alter enable_goldengate_replication to true in database.

SQL> show parameter enable_goldengate_replication
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean FALSE

SQL> alter system set enable_goldengate_replication=true scope=spfile;
System altered.

SQL> show parameter enable_goldengate_replication
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean TRUE

GGSCI (source.example.com) 1> dblogin userid ggadmin@srcdb password ********
Successfully logged into database.
GGSCI (source.example.com as ggadmin@DB11G) 2> register extract extract1 database
2019-06-15 01:29:21 INFO OGG-02003 Extract EXTRACT1 successfully registered with database at SCN 1063327.
GGSCI (source.example.com as ggadmin@DB11G) 3>

How to add integrated extract process in GG



GGSCI (source.example.com as ggadmin@DB11G) 15> edit params extract1


-- Add parameters as per your requirement
-- Change Data Capture parameter file to extract
-- source table changes
--
EXTRACT extract1
USERIDALIAS srcdb DOMAIN admin
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
EXTTRAIL ./dirdat/aa
SOURCECATALOG pdb1
TABLE hr.EMPLOYEES;

TABLE hr.DEPARTMENTS; 

GGSCI (source.example.com as ggadmin@DB11G) 16> add extract extract1, integrated tranlog begin now
EXTRACT (Integrated) added.

GGSCI (source.example.com as ggadmin@DB11G) 20> add exttrail ./dirdat/aa, extract extract1, megabytes 100
EXTTRAIL added.

GGSCI (source.example.com as ggadmin@DB11G) 21> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING
EXTRACT     STOPPED     EXTRACT1    00:00:00      00:06:18

GGSCI (source.example.com as ggadmin@DB11G) 22>

ERROR: Entry already exists in credential store.


[oracle@source ggs]$ ./ggsci

GGSCI (source.example.com) 1>

GGSCI (source.example.com) 2> alter credentialstore add user ggadmin@srcdb alias srcdb domain admin
Password:

ERROR: Entry already exists in credential store.

GGSCI (source.example.com) 3> DELETE CREDENTIALSTORE

Credential store deleted from ./dircrd/.

GGSCI (source.example.com) 5> add credentialstore

Credential store created in ./dircrd/.
GGSCI (source.example.com) 7> alter credentialstore add user ggadmin@srcdb alias srcdb domain admin
Password:

Credential store in ./dircrd/ altered.

GGSCI (source.example.com) 8> dblogin userid ggadmin@srcdb password *******
Successfully logged into database.

How to create credentialstore on 12c GG


==> create wallet first
==> create credentialstore init.
==> add ggadmin user in credentialstore
==> validate credentialstore.

GGSCI (source.example.com) 1> create wallet
Created wallet at location 'dirwlt'.
Opened wallet at location 'dirwlt'.

GGSCI (source.example.com) 2> add credentialstore
Credential store created in ./dircrd/.

GGSCI (source.example.com) 3> alter credentialstore add user ggadmin@source alias srcdb domain admin
Password:
Credential store in ./dircrd/ altered.

GGSCI (source.example.com) 4> info credentialstore domain admin
Reading from ./dircrd/:
Domain: admin
  Alias: srcdb
  Userid: ggadmin@source
GGSCI (source.example.com) 5>

Wednesday 12 June 2019

Install jenkins on cent OS 7.6


1] Create user jenkins
[root@localhost ~]# adduser jenkins
[root@localhost ~]# passwd jenkins
Changing password for user jenkins.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
2] Provide sudo access to user jenkins
3] Enable the Jenkins repository
[jenkins@localhost ~]$ curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
[sudo] password for jenkins:
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1
[jenkins@localhost ~]$ cat /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1
[jenkins@localhost ~]$ sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
4] Install jenkins package.
[jenkins@localhost ~]$ sudo yum install jenkins
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
jenkins                                                                 | 2.9 kB  00:00:00
jenkins/primary_db                                                      |  29 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:2.176.1-1.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================
 Package              Arch                Version                   Repository            Size
===============================================================================================
Installing:
 jenkins              noarch              2.176.1-1.1               jenkins               74 M

Transaction Summary
===============================================================================================
Install  1 Package
Total download size: 74 M
Installed size: 74 M
Is this ok [y/d/N]: y
Downloading packages:
jenkins-2.176.1-1.1.noarch.rpm                                          |  74 MB  00:01:08
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : jenkins-2.176.1-1.1.noarch                                                  1/1
  Verifying  : jenkins-2.176.1-1.1.noarch                                                  1/1
Installed:
  jenkins.noarch 0:2.176.1-1.1
Complete!
5] Start jenkins service
[jenkins@localhost ~]$ sudo systemctl start jenkins
[jenkins@localhost ~]$ sudo systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
   Active: active (running) since Wed 2019-06-12 15:05:15 IST; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22471 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
    Tasks: 21
   CGroup: /system.slice/jenkins.service
           └─22492 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headl...
Jun 12 15:05:13 localhost.localdomain systemd[1]: Starting LSB: Jenkins Automation Server...
Jun 12 15:05:13 localhost.localdomain runuser[22476]: pam_unix(runuser:session): session o...0)
Jun 12 15:05:15 localhost.localdomain jenkins[22471]: Starting Jenkins [  OK  ]
Jun 12 15:05:15 localhost.localdomain systemd[1]: Started LSB: Jenkins Automation Server.
Hint: Some lines were ellipsized, use -l to show in full.
[jenkins@localhost ~]$
[jenkins@localhost ~]$ sudo systemctl enable jenkins
6] Enable port on machine for jenkins URL
[jenkins@localhost ~]$ sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
sudo firewall-cmd --reload
[jenkins@localhost ~]$ netstat -tulpn | grep :8080
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::8080                 :::*                    LISTEN      22492/java    
7] Connect jenkins using below link
8] Select password from given location file.
[jenkins@localhost ~]$ cat /var/lib/jenkins/secrets/initialAdminPassword
c548bf029c674115b99ea3b0f25203e2
9] Click on install suggested plugin.
           
Add caption








work on autovacuum postgreSQL parameter

 In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...