Showing posts with label Golden Gate. Show all posts
Showing posts with label Golden Gate. Show all posts

Tuesday, July 9, 2013

ERROR OGG-00868 Attaching to ASM server +ASM1: (12528) ORA-12528: TNS:listener: all appropriate instances are blocking new connections.

ERROR OGG-00868 Attaching to ASM server +ASM1: (12528) ORA-12528: TNS:listener: all appropriate instances are blocking new connections.

When the extract connects with the ASM instance to Read the data it get's this error due to the blocked connection in the  ASM instance Normally the ASM instance  is Blocked for the remote connectivity We need to add the parameter (UR=A) in the tnsnames.ora file for enabling the remote connection to the ASM instnace

Step 1

check the connectivity to the ASM by connecting the asm instance remotely

oraprod@db01[+ASM1]:$ sqlplus "sys/omoic@+asm1 as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Jun 25 22:58:39 2013
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

Navigate to the TNS_ADMIN and edit the tnsnames.ora file and add the parameter UR=A below the service name parameter

+ASM1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = <port number>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = +ASM)
        (UR=A)
 ))

+ASM2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = <port number>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = +ASM)
        (UR=A)
 ))

If we have Multiple ASM instance's then we need to add this parameter  in all the instance  refer the metalink note How to connect to ASM instance from a remote client (Doc ID 340277.1)

Step 2

Once the Parameter is added then we need to restart the listener services 
oracle@db01[PROD1]:$ lsnrctl reload LISTNER_DB01
oracle@db01[PROD2]:$ lsnrctl reload LISTNER_DB02

Step 3

Check the parameter Remote Log in password in the ASM instance if you have single asm instance it should be exclusive and it it is RAC environment you can use the shared for the password file
Move the existing Password file for the ASM into the new location and then create a new password file for the ASM instnace

oracle@db01[+ASM1]:$ orapwd file=orapw+ASM1 password=<password>

Once the new password file is created then use that password to connect remotely to the ASM instance  once by using the password you are able to connect the ASM instance then check the golden gate's process of extract


 


Monday, July 8, 2013

ERROR OGG-00868 : (12514) ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

ERROR   OGG-00868  Attaching to ASM server +ASM1: (12514) ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

When we are connecting to the Golden gate's Source database as RAC and with ASM then you nedd to create the ASM services in the Listener .. the asm Services will be blocked always science it is not allowed to connect remotely.. follow the steps to create the entry  in the listener.ora file and tnsnames.ora files for the asm instance and create the service's and the remote connection 

Step 1

Add the entries for the  ASM instance in the listener.ora file  check the listener has the services for the ASM

oracle@db01[PROD]:$  lsnrctl services LISTENER_db01 |grep ASM
oracle@db02[PROD]:$  lsnrctl services LISTENER_db02 |grep ASM

IF there is no services for asm then it will not return any rows we need to create the new services for the ASM .. to create the new services for ASM edit the listener.ora and tnsnames.ora file 
 Here we have assumed the paractice for two node cluster if you have n number of nodes then you shoud   create the respective ASM Instance's entry in each Node's

In Node 1 Listener make an entry for the ASM 1 Instance

SID_LIST_LISTENER_db01 =
  (SID_LIST =
    (SID_DESC = (ORACLE_HOME = /prod01/app/oracle/db/10.2.0)(SID_NAME = PROD1))
     (SID_DESC =(GLOBAL_DBNAME  = +ASM)(SID_NAME = +ASM1)(ORACLE_HOME =/prod01/app/oracle/asm/10.2.0 ))
        (SID_DESC = (SID_NAME = PLSExtProc)(ORACLE_HOME = /prod01/app/oracle/db/10.2.0)(PROGRAM = extproc))
)
 
IN Node two Listener Make the entry of ASM2 instance

SID_LIST_LISTENER_db02 =
  (SID_LIST =
    (SID_DESC = (ORACLE_HOME = /prod01/app/oracle/db/10.2.0)(SID_NAME = PROD2))
     (SID_DESC =(GLOBAL_DBNAME  = +ASM) (SID_NAME = +ASM2)(ORACLE_HOME =/prod01/app/oracle/asm/10.2.0 ))
       (SID_DESC = (SID_NAME = PLSExtProc)(ORACLE_HOME = /prod01/app/oracle/db/10.2.0)(PROGRAM = extproc))
  )
Once the listener files had been edited then edit the tnsnames.ora file for adding the entries for the 

In Node 1 add the entries to the tnsnames.ora file  for asm instance

ASM
+ASM1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <host name>)(PORT = <port number>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = +ASM)
        (UR=A)
 ))
In Node 2 add the entries to the  tnsnames.ora file for asm instance
 
+ASM2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <host name>)(PORT = <port number>))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = +ASM)
       (UR=A)

Step 2
Check the Local_Listener parameter in the ASM instnace's

IN ASM Instance 1
SQL> show parameter LOCAL
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
local_listener                       string                           

IN ASM Instance 2

SQL> show parameter LOCAL

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
local_listener                       string                           
Add the listener value for the parameter in the respective instance's
IN ASM 1 instance

SQL>alter system set local_listener=LISTENER_DB01

SQL> show parameter LOCAL
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
local_listener                       string                            LISTENER_DB01
 IN ASM2 Instance

SQL>alter system set local_listener=LISTENER_DB02

SQL> show parameter local
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
local_listener                       string                            LISTENER_DB02

The Listener LISTENER_db01 and LISTENER_db02 are two listener which we have in the rac environment but according to your environment you can set the listener names 
Step 3
Reload the Listener for the changes to take effect

IN Node 1

oracle@db01[PROD]:$ lsnrctl reload LISTENER_DB01
LSNRCTL for HPUX: Version 10.2.0.3.0 - Production on 08-JUL-2013 16:34:44
Copyright (c) 1991, 2006, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=<portnumber>)(IP=FIRST)))
The command completed successfully

In Node 2
 
oracle@db02[PROD]:$ lsnrctl reload LISTENER_DB02
LSNRCTL for HPUX: Version 10.2.0.3.0 - Production on 08-JUL-2013 16:36:35
Copyright (c) 1991, 2006, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=<portnumber>)(IP=FIRST)))
The command completed successfully

Step 4

check the listener for the new services in both the nodes you will get the services it will be blocked by default and if you want to connect remotely then you need to add the (UR=A) parameter in the tnsnames .ora file

oracle@db01[+ASM1]:$ lsnrctl services LISTENER_DB01|grep ASM
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...

oracle@db02[+ASM2]:$ lsnrctl services LISTENER_DB02|grep ASM
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...

Step 5
Connect the ASM instance remotely and check whether it is able to connect the instance
oracle @db01[+ASM1]:$ sqlplus "sys<password>@+asm1 as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Jul 8 16:40:29 2013
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

Step 6

Check the parameter to use the TRANLOGOPTIONS for the extract 
 Add the TRANLOGOPTIONS parameter with the below syntax

Syntax  for the parameter 
TRANLOGOPTIONS ASMUSER <username>@<instnace_name> , ASMPASSWORD<password>

Now start the extract to read the data from the ASM
 




 




























Sunday, November 11, 2012

ERROR OGG-00446 SQL operation failed: Inserting into checkpoint table


ERROR   OGG-00446  SQL operation failed: Inserting into checkpoint table,

When we are creating the Replicate  we need to create the checkpoint table which stores  metadata of the  replicates transaction details in it for the specified time..
The checkpoint table store the information from the last trail files records  which is inserted int to  the database.. If the replicated goes to improper shutdown or normal stop of the replicate then when we start the replicate... It refers to the checkpoint table for the last transactions in database and and according to it Replicate will write the records in the database
A checkpoint table can be created as common for more than one replicate's to store the metadata of the replicate 
Checkpoint table can be create in any schema as per your wish .. but it is recommend to create   in the gg schema 
we can use the GLOBALS parameter to create the default checkpoint for all the Replicates .. if we use the GLOBALS we no need to specify the checkpoint table at that time of add the replicate .. it will pick the default Checkpoint table from the GLOBALS parameter

To Create the check point table

Step 1

Log-in with the ggsci prompt and proceed with the edit parameter GLOBALS for creating the default checkpoint table

[oratest@fah gg]$ ./ggsci

GGSCI (fah) 2> edit params ./GLOBALS

Edit the GLOBALS parameter and add the checkpoint table in it format to add the checkpoint table is checkpoint table <table_name>
checkpointtable <table_name>
Now a file will be create as GLOBALS on the gg_home with the inserted recorded of table_name
Step 2

we need to login into the database for adding the checkpoint table

If you have set the Env variables like ORACLE_SID,ORACLE_HOME in replicate then you can issue the command

GGSCI (fah) 4> dblogin userid <username>,password <password>
Successfully logged into database.

If the env variables are not set then we have to issue 

GGSCI (fah) 8> DBLOGIN USERID  <username>@<hostname>:<database_port>/<database service name>,PASSWORD < password 
>
Successfully logged into database.

Step 3

Add the checkpoint table in  the database

GGSCI (fah) 17> add checkpointtable <table_name>

Successfully created checkpoint table <table_name>.

 A new table will be created in the default gg schema with the table_name which is specified 

Step 4

Add the replicate with the checkpoint table 

GGSCI (fah) 19> add replicat <replicte_name> exttrail ./dirdat/22 checkpointtable <table_name>
REPLICAT added.

GGSCI (fah) 20> start <replicate_name>

Sending START request to MANAGER ...
REPLICAT <replicate_name> starting

Step 5

Check the stats of the particular replicate

GGSCI (fah) 30> stats <replicte_name>

Sending STATS request to REPLICAT <replicate_name> ...

Start of Statistics at 2012-11-10 13:09:55. 

*** Total statistics since 2012-11-10 13:08:37 ***
        Total inserts                            14666.00
        Total updates                                0.00
        Total deletes                                0.00
        Total discards                            2249.00
        Total operations                         14666.00

Step 6

Check the checkpoint table which holds the checkpoint for the last transaction 


SQL> select * from GGSCHKPT;

GROUP_NA  GROUP_KEY      SEQNO        RBA AUDIT_TS                      CREATE_TS LAST_UPDA CURRENT_DIR
-------- ---------- ---------- ---------- ----------------------------- --------- --------- ------------------------------------------------------------
TRANR1      5870815         29    6411875 2012-11-11 00:05:29.758380    10-NOV-12 11-NOV-12 /u06/app/oracle/product/gg

It stores the sequence number and last RBA and time stamp in it

and undet the 
Note : if you are not specifying  the the checkpoint table a the time of creation of replicate then you will get the below error message

ERROR   OGG-00446  SQL operation failed: Inserting into checkpoint table GGSCHKPT, group TRANR1, SQL <INSERT INTO "GGSCHKPT" (group_name, group_key, current_dir, create_ts, last_update_ts,  seqno, rba, audit_ts) VALUES (:group_name, :group_key, :current_dir, :create_ts, sysdate, :seqno, :rba, :audit_t> SQL Error 942: ORA-00942: table or view does not exist

For Solving this error we need to create the checkpoint table 






Sunday, October 7, 2012

ERROR OGG-01028 Recovery record is missing from log with seqno when extract has reached log with seqno block size 512, and next_checkpoin t RBA


ERROR   OGG-01028  Recovery record is missing from log with seqno <no> when extract has reached log with seqno <no>, block size 512, and next_ checkpoint to RBA at <number>

when  we  manually stop the extract then   current/next checkpoint is set to a zero length record in redo nay cause this issue
The zero length record is skipped as the gg thinks that there is no data and the rbd moves to the next block skipping the current one but the recovery  code thinks that there is a data miss and then cause this error when we restart the extract

Step 1

Check the current status of the extract by using the
Syntax info extract <extract name> 

info extract setupe

EXTRACT    SETUPE    Last Started 2012-10-07 01:05   Status ABENDED
Checkpoint Lag       00:00:00 (updated 01:16:44 ago)
Log Read Checkpoint  Oracle Redo Logs
                     First Record         Thread 1, Seqno 61, RBA 710938008
Step 2

Backup the files in the dirchk  directory
dirchk directory lays under the root directory of the gg where all the checkpoint's for the replicates and the extracts are store 
[oracle@fah gg]$ cd dirchk
[oracle@fah dirchk]$ cp SETUPE.cpe SETUPE_backup.cpe
[oracle@fah dirchk]$ cp SETUPE.cpb SETUPE_backup.cpb

Step 3

To find the current extract seq-no and  read write and recovery rba issue the show ch command  in the extract

SYNTAX: info <extract_name>,showch

GGSCI (fahdb.oasiserp.com) 4> info SETUPE,showch

EXTRACT    SETUPE    Last Started 2012-10-07 01:05   Status ABENDED
Checkpoint Lag       00:00:00 (updated 01:17:16 ago)
Log Read Checkpoint  Oracle Redo Logs
                     First Record         Thread 1, Seqno 61, RBA 710938008

Oracle RAC Redo Log

  Start up Checkpoint (starting position in the data source):
    Thread #: 1
    Sequence #: 61
    RBA: 710938008
    Time stamp:
    SCN: Not available
    Redo File: +FLASH/fah/onlinelog/group_1.260.792016705

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 1
    Sequence #: 61
    RBA: 710938008
    Timestamp:
    SCN: Not available
    Redo File: +FLASH/fah/onlinelog/group_1.260.792016705

  Current Checkpoint (position of last record read in the data source):
    Thread #: 1
    Sequence #: 61
    RBA: 710938008
    Timestamp:
    SCN: Not available
    Redo File: +FLASH/fah/onlinelog/group_1.260.792016705

Step4

we need to alter the current Checkpoint and the recovery Checkpoint to the next block number 
To find the next block number we have a calculation

Ceil(Current Rba /block_number)*(block_number)

In the above scenario we have the 

current RBA as  710938008
Block size     as  512

SQL> select ceil (710938008/512)*512  from dual;

CEIL(710938008/512)*512
-----------------------
              710938112
As the the above example the next RBA is 710938112  the block number and the seq number remains same

Step 5

SYNTAX: alter <extact_name  >, extseqno <seq#>, extrba <rba#>

The extract extract_name ,extseqno <the same seq number>,extrba <The new Rba which is calculated above >

GGSCI (fahdb.oasiserp.com) 8> alter extract SETUPE ,extseqno 61,extrba 710938112

ERROR: Only time stamps may be altered for checkpoints of all RAC instances. Use THREAD option to alter position per thread..

If we are using the Rac  instance or the single node HAS service then we need to specify the thread number while alerting the extract 

Step6

Check the size of the archive log and whether it is greater than the next rba which we have calculated if it is greater then proceed with the following steps

Alter the extract with the next rba

we need to alter the extract with the next rba to proceed

Synatx : alter extract <extract_name>,thread 1,extseqno <ext sequence number>,extrba <extrba number>


GGSCI (fah) 2> alter extract SETUPE ,thread 1, extseqno 61,extrba 710938112 [ next rba]
EXTRACT altered.


To Alter the extract with the io ext sequence 

we need to alter the extract io sequence with the current rba  we can proceed with yes when it Prompts you

Syntax   Alter extract <extract_name>,thread1 ,ioextseqno <current seq number > ,ioextrba <current rba>



GGSCI (fah) 3>  alter extract SETUPE ,thread 1, ioextseqno 61,ioextrba 710938008 [current rba]


2012-10-07 03:15:11  INFO    OGG-00988  WARNING: Unsupported operation. This mig EXTRACT: ioseq = 61 iorba = 710938008.
Are you sure you want to continue? yes
EXTRACT altered.



Step7

Check the changes in the extract by issuing the info extract_name ,showch
once you conform the changes had taken effect start the extract


GGSCI (fah) 4> start extract SETUPE

Sending START request to MANAGER ...
EXTRACT SETUPE starting

check the extract status


GGSCI (fahdb.oasiserp.com) 10>  info setupe

EXTRACT    SETUPE    Last Started 2012-10-07 03:15   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:05 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-10-07 03:17:11  Thread 1, Seqno 62, RBA 896522768



   


Monday, August 27, 2012

Adding the extract in the GoldenGate with thread options for RAC database

Adding the extract in the Golden Gate with thread options 

To add the extract in the golden latest version 11.2. we have to download the golden gate from the edelivery .oracle.com fusion middle ware and unzip in the appropriate  location if you are using  the RAC database unzip the contents  in the shared directory which is accessible to all the nodes

Step 1 
For golden gate there is a command prompt knows as ggsci and go to the golden gate root directory [the directory which you have unzipped the contents of the file and type ./ggsci

oraprod@db[PROD1]:$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
HP/UX, IA64, 64bit (optimized), Oracle 10g on Apr 23 2012 22:20:31

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

GGSCI (db) 1>

Now you will get the ggsci command prompt 

Step 2
Creating the sub directories there are may sub directories to be created as the empty directory   for  various operations of the gg


GGSCI (db) 3> create SUBDIRS

Creating subdirectories under current directory /fah/ggtest/gg

Parameter files                       /fah/ggtest/gg/dirprm: created
Report files                           /fah/ggtest/gg/dirrpt: created
Checkpoint files                    /fah/ggtest/gg/dirchk: created
Process status files                /fah/ggtest/gg/dirpcs: created
SQL script files                     /fah/ggtest/gg/dirsql: created
Database definitions files      /fah/ggtest/gg/dirdef: created
Extract data files                    /fah/ggtest/gg/dirdat: created
Temporary files                     /fah/ggtest/gg/dirtmp: created
Stdout files                            /fah/ggtest/gg/dirout: created


Step 3
exit from the ggsci command prompt and create the necessary Parameter files and add it in the dirprm directory

GGSCI (db) 3> exit
oraprod@db[PROD1]:$ cd dirprm
oraprod@db[PROD1]:$ ls
defgen.prm    jagent.prm    mgr.prm       setupini.prm  setupr.prm    trane.prm     tranp.prm     tranr.prm

Step 4
start the manager first
GGSCI (db) > start MGR

Manager started.

GGSCI (db) > info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

Step 5
Add the extract into the gg and check the extract according to the number of instance's we need to specify the thread if you have more that 2 nodes then you have to specify according to it

GGSCI (db) > ADD EXTRACT TRANE, TRANLOG, BEGIN NOW, THREADS 2
EXTRACT added.


GGSCI (db) > info *

EXTRACT    TRANE     Initialized     2012-08-26 12:13 Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-27 12:11:10  Thread 1, Seqno 0, RBA 0
                     SCN 0.0 (0)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-27 12:11:10 Thread 2, Seqno 0, RBA 0
                     SCN 0.0 (0)


EXTRACT    TRANE     Last Started 2012-08-26 12:13   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:10 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-27 13:57:41  Thread 1, Seqno 73117, RBA 97613824
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-27 13:57:41  Thread 2, Seqno 85862, RBA 82908040





OCI Error ORA-00001: unique constraint violated

OCI Error ORA-00001: unique constraint  violated

The replicate will be in a a banded  state  and when you get this error in the gg replicate then you have to check the data from the source table and the target table...
Some of the data which is present in the source table is already present in the target table
 we need to check the records from two table on which the error is produced there is a solution for this ... by adding the rep parameter  on the replicate parameter file

Step1

Once the process is getting abandoned  we need to check the report file of the particular process 
GGSCI (fahdb.) 2> view report TRANR1
and find the details of the error in the report file

2012-08-26 14:55:33  WARNING OGG-00869  OCI Error ORA-00001: unique constraint (constraint _name) violated (status = 1), 
2012-08-26 14:55:33  WARNING OGG-01004  Aborted grouped transaction on 'table_name', Database error 1 (OCI Error ORA-00001: unique constraint (constraint _name) violated (status = 1), <sql statment>
2012-08-26 14:55:33  WARNING OGG-01003  Repositioning to rba 846885 in seqno 150

Step 2
Conform from the source and the target side whether the records which is present in the source is present in the target and the source is trying to send the record which is already present in the target table,,, this cause's the ORA-00001 .. the unique constraint of the   target table is violated because the data is already present in the table but the source is trying to insert the same record...
Query both the tables involved in and verify the record

Step 3
There are two ways to rectify the error we can do it globally of all the tables are we can do it only for the particular table
here we followed the global strategy ... if your replicate and the extract using more then one table and causing the error .. it is wise to follow the global strategy
By add in the parameter in the parameter file we can avoid this error and we can create the discard file to hold the discarded data[ if the  data which is already present in the Target then that data will be moved into the discard file]
Step4

We need to add the parameter in the extract or replicate's parameter file
Go to the root directory of the gg and the navigate to dirprm which hold's all the parameter file's for the process

[oracle@fahdb dirprm]$ pwd
/u01/app/oracle/product/gg/dirprm

[oracle@fahdb dirprm]$ ls
defgen.prm  mgr.prm     setupi1.prm  trane.prm   tranr1.prm
setupe.prm  setupp1.prm  tranp1.prm

Parameter with discard file 

ADD THE PARAMETER REPERROR (1, DISCARD)  

Advantage of creating the discard file is we can check the duplicate record's which are tried to insert in to the target table all the duplicate records will be stored in the discard file

Parameter with out discard file 

ADD THE PARAMETER REPERROR (1)

once the parameter is added we can start the replicate  if the replicate start's fine and check the discard file and wait until the all the trail files are processed .. once all the trail files are processed the yo can comment out the parameter if it is not commented out also there is no harm in it 

while starting the replicate if this kind of error appear's  then we need to increase the discard file size to hold all the record's 

 ERROR   OGG-01172  Discard file (./dirrpt/TRANR1.DSC) exceeded max bytes (1000000).

INCREASING THE DISCARD FILE SIZE

Step1

Go to the particular parameter file and add to the below parameter in the file 
Here we are transferring the data two source table's to two target table's

Check the report file you can view this king of error message in it 
2012-08-26 18:04:22  ERROR   OGG-01172  Discard file (./dirrpt/TRANR1.DSC) exceeded max bytes (1000000).

***********************************************************************
*                   ** Run Time Statistics **                         *
***********************************************************************

Reading ./dirdat/t1000150, current RBA 1325874, 37 records

Report at 2012-08-26 18:04:22 (activity since 2012-08-26 18:04:21)

From Table <source_table>to <target_table>: --  table 1 from source and target 
       #                   inserts:         0
       #                   updates:         0
       #                   deletes:         0
       #                  discards:       275
From Table <source_table>to <target_table>:-- table 2 from source and target 
       #                   inserts:        37
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         0
 Stored procedure fusion.gl_remote_transfer_pkg.do_import:
         attempts:        37
       successful:        37

From Table   <source_table>to <target_table>:
  Stored procedure tt3:
         attempts:        37
       successful:        37

                                                          

Adding the discard file with the specific value

DISCARDFILE ./dirrpt/TRANR1.DSC, APPEND, MEGABYTES 100


DISCARDFILE                               -keyword
./dirrpt/TRANR1.DSC                    -File location
APPEND                                         - it will append the discard file when the discard file contains already data in it
MEGABYTES <value>                   -estimate the volume of the duplicate data and according to ti we should give the size if you want to
                                                           Size in GB you have to specify the Parameter GIGABYTE [GB]


Adding the discard file with the PURGE

DISCARDFILE ./dirrpt/TRANR1.DSC, PURGE

if we add the discard file with the purge command then when ever you restart the replicate or extract the previous data which is residing in the  discard file will be purged
Both the parameter's can't be added at the same time .. we have to choose nay one of the option's


Step 2

Start the replicate ...

Check the report file for how many discard's had happened

Reading ./dirdat/t1000151, current RBA 2111708, 2183 records

Report at 2012-08-26 23:27:51 (activity since 2012-08-26 18:09:41)

From Table <source_table>to <target_table>: --  table 1 from source and target
       #                   inserts:      2133
       #                   updates:         0
       #                   deletes:         0
       #                  discards:       364
From Table  <source_table>to <target_table>:-- table 2 from source and target
       #                   inserts:        82
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         0
  Stored procedure fusion.gl_remote_transfer_pkg.do_import:
         attempts:       125
       successful:       125

From Table GL.GL_XFR_TRACKING to FUSION.GL_XFR_TRACKING:

    Stored procedure tt3:
         attempts:       125
       successful:       125

Now check the discard file which is created on the  location which have been specified in the parameter


[oracle@fahdb dirrpt]$ ll *.DSC

-rw-r--r-- 1 oracle oinstall 3642373 Aug 26 23:33 TRANR1.DSC








Wednesday, July 25, 2012

OGG-01423 No valid default archive log destination directory found for thread :EXTRACT ABENDED

OGG-01423 No valid default archive log destination directory found for thread  :EXTRACT ABENDED

If any of the archive log thread is missing are not Readable by the Golden gate the warning message will be in the extract report file and the extract will move in to the Abended state 

Step 1
check the extract status ..in the ggsci command prompt

GGSCI (db) > info TRANE

EXTRACT    TRANE     Last Started 2012-07-19 01:05   Status ABENDED
Checkpoint Lag       00:00:00 (updated 134:26:36 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-20 09:10:37  Thread 1, Seqno 71824, RBA 14858240
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-20 09:10:42  Thread 2, Seqno 83766, RBA 93465600
Note the sequence number of the Redo log and make sure that all the redo logs are available and the redo log destination is reachable by the GG

GGSCI (db) > send TRANE status

2012-07-25 23:38:56  INFO    OGG-00987  GGSCI command (prod): send TRANE status.

ERROR: EXTRACT TRANE not currently running.

Step 2

View the report file and Check for the warning and the error messages the rpt file is located under dirrpt in the gg root directory

2012-07-25 21:24:26  WARNING OGG-01423  No valid default archive log destination directory found for thread 1.
Maximum supported ASM read buffer size is 28 KB
2012-07-25 21:24:26  WARNING OGG-01423  No valid default archive log destination directory found for thread 2.
2012-07-25 21:24:26  INFO    OGG-00546  Default thread stack size: 262144.
2012-07-25 21:24:26  INFO    OGG-01513  Positioning to (Thread 1) Sequence 71796, RBA 35363856, SCN 3.2783180541.

If youa re getting this kind of warning messages better check the archive log  sequence which is mentioned  in the error and if the particular archive log is not available restore it to the archive log destination from that point of archive log the golden will proceed to read the data from it to till now so check all the archive log up to date
In case if you don't have the archive log then  also we can start the gg  by altering the extract checkpoint to the lease archive log which is available,,,  in are omitting some archive log there will be data loss during that time period
for example if you're extract had stopped at Sunday and   you are trying to start on Wednesday but if you don't have the archive log  for  Monday then we can alter the gg checkpoint o the Tuesday and we can proceed from Tuesday to until present ... but the monday's data will be loss and you have to think for alter arrangement to move the data for that day

Step3
Alter the extract to the least available the archive-log
and if you are using the GG in the Rac environment then you have to alter all the threads according to the archive log available 

 GGSCI (db) > alter ext trane, thread 1, extseqno71831 , extrba 0
2012-07-25 23:39:50  INFO    OGG-00987  GGSCI command (oraprod): alter ext trane  thread 1, extseqno 71831, extrba 0.
EXTRACT altered.

GGSCI (db) > alter ext trane, thread 2, extseqno 83777, extrba 0
2012-07-25 23:40:34  INFO    OGG-00987  GGSCI command (oraprod): alter ext trane  thread 2, extseqno 83777, extrba 0.
EXTRACT altered.

In this situation we have archive log's starting from the 71831,and 83777 as we are  in the two node RAC environment  

Step 4
Alter the extract for the io checkpoint also

alter extract trane ,thread 1, ioextseqno 71831 ,ioextrba 0

2012-07-25 23:40:11  INFO    OGG-00988  WARNING: Unsupported operation. This might cause transactional inconsistency. Modifying input checkpoint #1, Oracle thread #1 of EXTRACT: ioseq = 71831 iorba = 0.

Are you sure you want to continue? Y
EXTRACT altered.

alter extract trane ,thread 2,ioextseqno 8377 ,ioextrba 0

2012-07-25 23:40:57  INFO    OGG-00988  WARNING: Unsupported operation. This might cause transactional inconsistency. Modifying input checkpoint #2, Oracle thread #2 of EXTRACT: ioseq = 83777 iorba = 0.
Are you sure you want to continue? Y
EXTRACT altered.


Step 5
start the extract and check the status 

GGSCI (db) > start TRANE

GGSCI (db) > info TRANE

EXTRACT    TRANE     Last Started 2012-07-25 23:41   Status RUNNING
Checkpoint Lag       134:30:52 (updated 00:00:00 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-20 09:10:37  Thread 1, Seqno 71831, RBA 0
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-20 09:10:42  Thread 2, Seqno 83777, RBA 0
Step 6
Check the lag point and wait until all the lag's are processed and it becomes zero

GGSCI (db) > info all

Program               Status              Group       Lag           Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     TRANE       134:30:52     00:00:09

EXTRACT     RUNNING     TRANE       121:40:09     00:00:07

GGSCI (db) > info all

Program              Status              Group       Lag           Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     TRANE       42:11:29      00:00:08
EXTRACT     RUNNING     TRANP       00:00:00      00:00:01
REPLICAT    RUNNING     SETUPR      00:00:00      00:00:07
REPLICAT    RUNNING     TRANR       00:00:00      00:00:02

GGSCI (db01) 38> info all

Program             Status              Group        Lag           Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     TRANE       00:00:00      00:00:01
EXTRACT     RUNNING     TRANP       00:00:00      00:00:06
REPLICAT    RUNNING     SETUPR      00:00:00      00:00:05
REPLICAT    RUNNING     TRANR       00:00:00      00:00:01

Wait until the Lag becomes zero .. once it is zero then it will proceed  Normally .... 

Wednesday, July 18, 2012

OGG-01028 encountered commit SCN that is not greater than the highest SCN already processed


 OGG-01028  encountered commit SCN  that is not greater than the highest SCN already processed

when implementing the golden gate with the RAC then scn commit point error occur's the SCN commit point difference between the two nodes are not Captured  the golden gate and the database heart beat cluster is not Captured  by the  Golden gate in the latest version of the golden gate This issue is resolved if you are in the older version 11.1.1.o then you may upgrade to the latest version there was the work around suggest by the meta link note and start the abended process if you have the pump extract then the master extract only fails  and goes to the abended state 

The steps to start the extract

   go the gg root directory and issue info * and verify the process status

EXTRACT    TRANE     Last Started 2012-07-09 22:39   Status ABENDED
Checkpoint Lag       00:00:04 (updated 57:54:28 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-16 10:28:05  Thread 1, Seqno 71663, RBA 37061648
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-16 10:28:05  Thread 2, Seqno 83522, RBA 97637256


EXTRACT    TRANP     Last Started 2012-07-10 00:10   Status RUNNING

Checkpoint Lag       00:00:00 (updated 00:00:07 ago)

Log Read Checkpoint  File ./dirdat/tt000132

                     2012-07-15 23:55:11.000000  RBA 1614803



     In the ggsci command prompt type the   command to view report of the extract which is failing view report TRANE


Source Context :
  SourceModule            : [er.main]
  SourceID                : [/home/ecloud/workspace/Build_OpenSys_r11.1.1.0.0_07
8_[34100]/perforce/src/app/er/rep.c]
  SourceFunction          : [process_extract_loop]
  SourceLine              : [22135]

2012-07-16 10:28:19  ERROR   OGG-01028  encountered commit SCN 3.2740850914 (156
25752802) that is not greater than the highest SCN already processed 3.274085101
3 (15625752901) Redo Thread 1 (1) xid 124.15.403910 (0x007c.000f.000629c6), star
ting seq.rba 71663.37062672, scn 3.2740850913 (15625752801), commit seq.rba 7166
3.37095672 commit timestamp 2012-07-16 10:28:17.000000.

In the ggsi command prompt do the info <extract name> ,showch and conform the read and write check point of the current EXTRACT


1]Do an ETROLLOVER on Extract, and take note of the new sequence number of the trail file 



Before doing the extract etrollover make a note of the trail file write check point .. to know the trail file checkpoint
in the ggsci command prompt  type info <extract name > ,showch

Write Checkpoint #1
  GGS Log Trail


  Current Checkpoint (current write position):
    Sequence #: 132
    RBA: 1614803
    Timestamp: 2012-07-16 10:28:09.090854
    Extract Trail: ./dirdat/tt

GGSCI (db) > ALTER EXTRACT TRANE  ETROLLOVER


2012-07-18 20:43:15  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract,  issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to  move the reader's scan to the new trail file;  it will not happen automatically 

EXTRACT altered.


after doing the extract etrollover you can see the new sequence number of the trail file had been created at the write checkpoint the previous was 132 and after rollover you can see the new trail file number 133 at the write check point

Write Checkpoint #1
GGS Log Trail
  Current Checkpoint (current write position):
    Sequence #: 133
    RBA: 856
    Timestamp: 2012-07-18 20:50:28.313045
    Extract Trail: ./dirdat/tt

2]  Start the extract



GGSCI (db) > START EXTRACT TRANE


Sending START request to MANAGER ...
EXTRACT TRANE starting

 2a} check whether the extract is in the running state

GGSCI (db) > info TRANE


EXTRACT    TRANE     Last Started 2012-07-18 20:44   Status RUNNING
Checkpoint Lag       58:16:47 (updated 00:00:05 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-16 10:28:05  Thread 1, Seqno 71663, RBA 37061648
Log Read Checkpoint  Oracle Redo Logs
                     2012-07-16 10:28:05  Thread 2, Seqno 83522, RBA 97637256




3]Send PUMP, LOGEND, and note the trail file number as it moves to the previous trail file 



GGSCI (db) > info TRANP


EXTRACT    TRANP     Last Started 2012-07-10 00:10   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:02 ago)
Log Read Checkpoint  File ./dirdat/tt000132
                     2012-07-15 23:55:11.000000  RBA 1614803


GGSCI (db) > SEND EXTRACT TRANP LOGEND


Sending LOGEND request to EXTRACT TRANP ...
YES.


wait until the log end command end's with YES 


4. Once you have got the output  as YES then , You must stop the pump, and do an ETROLLOVER for it too. Take note of the new trail file sequence number that is created from this step



GGSCI (db) > info TRANP


EXTRACT    TRANP     Last Started 2012-07-10 00:10   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:00 ago)
Log Read Checkpoint  File ./dirdat/tt000132
                     2012-07-15 23:55:11.000000  RBA 1614803

  GGSCI (db) > info   TRANP showch
Write Checkpoint #1
GGS Log Trail


Current Checkpoint (current write position):
    Sequence #: 135
    RBA: 1614836
    Timestamp: 2012-07-18 20:56:50.275291
    Extract Trail: ./dirdat/t1

make the note of the write check Point of the and the after the etrollover it will be increased stop the extract


GGSCI (db) > STOP EXTRACT  TRANP    --- stop the extract


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

GGSCI (db) > info tranp                           --check the status of the extract


EXTRACT    TRANP     Last Started 2012-07-10 00:10   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:05 ago)
Log Read Checkpoint  File ./dirdat/tt000132
                     2012-07-15 23:55:11.000000  RBA 1614803

GGSCI (db) 34> ALTER EXTRACT TRANP ETROLLOVER



2012-07-18 21:00:50  INFO   OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered



GGSCI (db) > info   TRANP showch

Write Checkpoint #1
 GGS Log Trail
  Current Checkpoint (current write position):
    Sequence #: 136 
    RBA: 0
    Timestamp: 2012-07-18 20:59:06.625434
    Extract Trail: ./dirdat/t1

Make a note of this number which we need to use in the replicate etrollover

5.] Alter the pump to SEQNO to the new trail file created from step #1

At this scenario we have got the new trail file number in the first step write checkpoint  and from 132 to it is changed to 133 after the etrollover and now the TRANP is in the 132 trail file and we have to change  it to the new trail file 133...

GGSCI (db) 38> ALTER EXTRACT TRANP EXTSEQNO 133 EXTRBA 0
EXTRACT altered.

6.] Start pump Extract

GGSCI (db) > start EXTRACT    TRANP

Sending START request to MANAGER ...
EXTRACT TRANP starting

GGSCI (db) > info  EXTRACT tranp

EXTRACT    TRANP     Last Started 2012-07-18 21:09   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint  File ./dirdat/tt000133
                     2012-07-16 15:36:02.000000  RBA 1207


Now you can see the extract Pump tranp  had been switched to the new trail file which is created at the master extract etrollover



These are the steps we have done in the source system and in the target system replicate we have run the LOGEND and Change the trail file t th new trail file created at the step 4


1] Login to the ggsci fo the target system where replicate is running  

REPLICAT   TRANR1    Last Started 2012-07-11 19:28   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:09 ago)
Log Read Checkpoint  File ./dirdat/t1000135
                     2012-07-16 00:03:32.629052  RBA 1614836

2]Send the replicate to the log end and wait until the out YES and stop the replicate 

GGSCI (fahdb) > SEND REPLICAT TRANR1 LOGEND

Sending LOGEND request to REPLICAT TRANR1 ...
YES.

GGSCI (fahdb.) > STOP REPLICAT TRANR1

Sending STOP request to REPLICAT TRANR1 ...
Request processed.


3 ]Alter the extract to the sequence number generated the PUMP extract had been etrollover  in our scenario it is 136 is the new trail file number...


GGSCI (fahdb) > ALTER REPLICAT TRANR1 EXTSEQNO 136 EXTRBA 0
REPLICAT altered.

GGSCI (fahdb) > START REPLICAT TRANR1

Sending START request to MANAGER ...
REPLICAT TRANR1 starting

GGSCI (fahdb) > info TRANR1

REPLICAT   TRANR1    Last Started 2012-07-18 21:46   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
Log Read Checkpoint  File ./dirdat/t1000136
                     2012-07-16 15:44:22.657553  RBA 1240


Now you can notice the same number in the RBA  between both the source and the 
target now both the node are in the synchronous and this is the way to start the Extract and we have to add two parameter in your master extract    


THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 15000 IOLATENCY 80000


As per metalink note this is the workaround and you shoud upgraded the GG to the new version

To cross verify the RBA you can check the trail file created in the both the GG's the RBA number will be as same as the trail file record size


IN extract GG


GGSCI (db) 5> sh ls -latr /fah/oracle/gg/dirdat/tt00013*


-rw-rw-rw-   1 oraprod    oinstall   9999233 Jul 12 09:31 /fah/oracle/gg/dirdat/tt000130
-rw-rw-rw-   1 oraprod    oinstall   9998804 Jul 15 17:19 /fah/oracle/gg/dirdat/tt000131
-rw-rw-rw-   1 oraprod    oinstall   1614803 Jul 15 23:55 /fah/oracle/gg/dirdat/tt000132
-rw-rw-rw-   1 oraprod    oinstall      1207 Jul 18 20:50 /fah/oracle/gg/dirdat/tt000133 


IN Replicate GG



GGSCI (fahdb.oasiserp.com) 4> sh ls -latr /u01/app/oracle/oracle/product/gg/dirdat/t100013*


-rw-rw-rw- 1 oracle oinstall 6850827 Jul  9 22:31 /u01/app/oracle/oracle/product/gg/dirdat/t1000130
-rw-rw-rw- 1 oracle oinstall 7418909 Jul 10 00:09 /u01/app/oracle/oracle/product/gg/dirdat/t1000131
-rw-rw-rw- 1 oracle oinstall 9235743 Jul 10 00:19 /u01/app/oracle/oracle/product/gg/dirdat/t1000132
-rw-rw-rw- 1 oracle oinstall 9999384 Jul 12 09:39 /u01/app/oracle/oracle/product/gg/dirdat/t1000133
-rw-rw-rw- 1 oracle oinstall 9998837 Jul 15 17:28 /u01/app/oracle/oracle/product/gg/dirdat/t1000134
-rw-rw-rw- 1 oracle oinstall 1614836 Jul 16 00:03 /u01/app/oracle/oracle/product/gg/dirdat/t1000135
-rw-rw-rw- 1 oracle oinstall    1240 Jul 18 21:18 /u01/app/oracle/oracle/product/gg/dirdat/t1000136