Friday, November 12, 2010

Configure Manager Process of Goldengate (Part 17 of series, Configuring Manager Process of Oracle Goldengate on Linux)

Make the effort, and chant the Lord's Name. O very fortunate ones, earn this wealth. In the Society of the Saints, meditate in remembrance on the Lord, and wash off the filth of countless incarnations.


Index of all the posts of Gurpartap Singh's Blog


Configure Manager process:

Though the only parameter required is port but we will use PURGEOLDEXTRACTS and USECHECKPOINTS so that old extracts are pruged after they are applied as follows. Though you can use the AUTOSTART parameter to autostart the extracts and replicats in this and also MINKEEPDAYS but I am not using here for now. We will modify it at a later stage. First simple things and then complex things.


PORT 7909
USERID goldengate, PASSWORD goldengate
PURGEOLDEXTRACTS /u01/app/oracle/product/goldengate/dir/ext, USECHECKPOINTS


When PURGEOLDEXTRACT is used with USECHECKPOINTS clause, it will ensure that until all processes have fnished using the data
contained in the trail files, they will not be deleted.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From documentation:

Use the PURGEOLDEXTRACTS parameter in a Manager parameter file to purge trail files when
GoldenGate has finished processing them. Without using PURGEOLDEXTRACTS, no purging is
performed, and trail files can consume significant disk space.

Please note:

When using this parameter, do not permit trail files to be deleted by any user or
program other than GoldenGate. It will cause PURGEOLDEXTRACTS to function
improperly.

and:

Autostart parameters

Use the AUTOSTART parameter to start Extract and Replicat processes when Manager starts.
This can be useful, for example, if you want GoldenGate activities to begin immediately
when you start the system, assuming Manager is part of the startup routine. You can use
multiple AUTOSTART statements in the same parameter file.
AUTOSTART {ER EXTRACT REPLICAT} {group name wildcard}
Use the AUTORESTART parameter to start Extract and Replicat processes again after
abnormal termination.
AUTORESTART {ER EXTRACT REPLICAT} {group name wildcard}
[, RETRIES ]
[, WAITMINUTES ]
[, RESETMINUTES ]


e.g.

PORT 7909
USERID goldengate, PASSWORD goldengate PURGEOLDEXTRACTS /u01/app/orcle/product/goldengate/dir/ext, USECHECKPOINTS
autostart extract *truth

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Output as:

$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized), Oracle 11 on Sep 17 2009 23:51:28

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



GGSCI (rac1.rac.meditate.com) 1> EDIT PARAMS MGR

PORT 7909
USERID goldengate, PASSWORD goldengate
PURGEOLDEXTRACTS /u01/app/oracle/product/goldengate/dir/ext, USECHECKPOINTS

-----------------------------------------------------------------------------------

Now lets start the manager as:

oracle : rac1.rac.meditate.com : @simar1 : /u01/app/oracle/product/goldengate
$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized), Oracle 11 on Sep 17 2009 23:51:28

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



GGSCI (rac1.rac.meditate.com) 1> start manager

Manager started.


GGSCI (rac1.rac.meditate.com) 2> info manager

Manager is running (IP port rac1.rac.meditate.com.7909).


GGSCI (rac1.rac.meditate.com) 3>



Manager can be stopped by the command, STOP MANAGER.

Some commads to debug incase you have problems:

VIEW REPORT MGR
OR
VIEW GGSEVT (looks in file /u01/app/oracle/product/goldengate/ggserr.log)


-----------------------------------------------------------------------------------------

Outputs of these look like:

oracle : rac1.rac.meditate.com : @simar1 : /u01/app/oracle/product/goldengate
$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized), Oracle 11 on Sep 17 2009 23:51:28

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



GGSCI (rac1.rac.meditate.com) 1> VIEW REPORT MGR


***********************************************************************
Oracle GoldenGate Manager for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized), Oracle 11 on Sep 17 2009 23:48:39

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


Starting at 2010-11-07 15:03:28
***********************************************************************

Operating System Version:
Linux
Version #1 SMP Thu Sep 3 03:28:30 EDT 2009, Release 2.6.18-164.el5
Node: rac1.rac.meditate.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: 31826

Parameters...

PORT 7909
USERID goldengate, PASSWORD goldengate
PURGEOLDEXTRACTS /u01/app/oracle/product/goldengate/dir/ext, USECHECKPOINTS



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


2010-11-07 15:03:28 GGS INFO 330 Manager started (port 7909).


GGSCI (rac1.rac.meditate.com) 2>


--------------------------------------------------------------------------------




We can then confirm that the GoldenGate user we have just created is able to connect to the Oracle database

create user meditate identified by meditate
default tablespace users
temporary tablespace temp;

grant connect,resource,dba to meditate;

conn meditate/meditate@simarsv1
create table employee as select * from scott.emp;

----------------------------------------------------------------------------------
Output is as:

SQL> conn / as sysdba
Connected.
SQL> create user meditate identified by meditate
default tablespace users
temporary tablespace temp;
2 3
User created.

SQL> grant connect,resource,dba to meditate;

Grant succeeded.

SQL> conn meditate/meditate@simarsv1
Connected.
SQL> create table employee as select * from scott.emp;

Table created.

SQL> select count(*) from meditate.employee;

COUNT(*)
----------
14

SQL>

Extract the ddl from here and then create the table structure under target schema :

SQL> set heading off;
set echo off;
Set pages 999;
set long 90000;SQL> SQL> SQL>
SQL> select dbms_metadata.get_ddl('TABLE','EMPLOYEE','MEDITATE') from dual;


CREATE TABLE "MEDITATE"."EMPLOYEE"
( "EMPNO" NUMBER(4,0),
"ENAME" VARCHAR2(10),
"JOB" VARCHAR2(9),
"MGR" NUMBER(4,0),
"HIREDATE" DATE,
"SAL" NUMBER(7,2),
"COMM" NUMBER(7,2),
"DEPTNO" NUMBER(2,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOC
OMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTE
NTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER
_POOL DEFAULT FLASH_CACHE DEFAULT CELL_F
LASH_CACHE DEFAULT)
TABLESPACE "USERS"



SQL>



O my mind, chant and meditate on the Name of the Lord. Enjoy the fruits of your mind's desires; all suffering and sorrow shall depart.

No comments:

Post a Comment