Tuesday, 11 June 2024

Migration of extract and pump process from 11g to 19c in golden gate

 In this example, we are going to migrated golden gate from 11g to 19c. As part of migration, we need to perform the below steps.

Step 1: Prerequisites.

1. Make sure that you can connect to GGSCI prompt.

2. check whether you have write access under $GGS_HOME


Step 2: Encrypt the GGSUSER password.

Note : Welcome123 is the actual password which will get encrypt.

GGSCI > ENCRYPT PASSWORD Welcome123 BLOWFISH ENCRYPTKEY DEFAULT

Using Blowfish encryption with DEFAULT key.

Encrypted password:  AACAAAAAAAKKKAAKAWDSBDHKHMBMGVBXAWHVCXHQIWIZEUCJF

Algorithm used:  BLOWFISH

Step 3: Login to the db using the encrypted password in GGSCI prompt.

GGSCI >  dblogin USERID  GGSUSER,  password AACAAKKKAAAAAKAWDSBDHKHMBMGVBXAWHVCXHQIWIZEUCJF, BLOWFISH encryptkey default

Successfully logged into database.

Step 4: create extract

GGSCI > edit params E_extract01

--ADD the below value and save it.

EXTRACT E_extract01

SETENV (ORACLE_SID="test")

SETENV (ORACLE_HOME="/opt/app/user/oracle/product/19.8.0")

USERID GGSUSER@test, password AACAAAAAAAAAAAKAWDSBDHKHMBMGVBXAWHVCXHQIWIZEUCJF, BLOWFISH ENCRYPTKEY DEFAULT

EXTTRAIL /opt/app/test/ggs/19.1.0.0.4/trails/g1

DISCARDFILE /opt/app/test/ggs/19.1.0.0.4/dirrpt/e_extract01.dsc, APPEND

GETTRUNCATES

NOCOMPRESSDELETES

REPORTROLLOVER ON sunday

REPORTCOUNT EVERY 60 MINUTES, RATE

REPORT At 23:59


TABLE user.A8;

TABLE user.BACKUP;

TABLE user.BAND;


GGSCI > add extract E_extract, integrated tranlog, begin now

EXTRACT (Integrated) added.

GGSCI > register extract E_extract database

2024-06-06 03:13:03  INFO    OGG-02003  Extract E_extract successfully registered with database at SCN 31393982.

GGSCI > ADD RMTTRAIL /opt/app/test/ggs/19.1.0.0.4/trails/g1, EXTRACT E_extract01

RMTTRAIL added.

Step 4: start the extract

GGSCI > start E_extract01

Step 5: create the pump process to communicate to the target server.

GGSCI > edit params P_pump01

STATOPTIONS REPORTFETCH

REPORTCOUNT EVERY 10 MINUTES, RATE

RMTHOST  target_localhost, MGRPORT 8000, TcpBufSize 1048576, TcpFlushBytes 1048576

RMTTRAIL /opt/app/target_host/acfs/ggs/ggs19c/trails/Bag/b1

PASSTHRU

TABLE user.A8;

TABLE user.BACKUP;

TABLE user.BAND;

GGSCI > ADD EXTRACT P_pump01, EXTTRAILSOURCE /opt/app/test/ggs/19.1.0.0.4/trails/g1

EXTRACT added.


GGSCI > ADD RMTTRAIL /opt/app/target_test/acfs/ggs/ggs19c/trails/BAG/b1, EXTRACT P_pump01

RMTTRAIL added.

Step 6: start the Pump process

GGSCI > start P_pump01

Step 7: Validate the extract and the pump process.


If still RBA is 0, then cross check below link

ogg-01061-invalid-csn-value-length0

Friday, 7 July 2023

OGG-01061 Invalid CSN value length(0) from data source during recovery in goldengate

 OGG-01061 Invalid CSN value length(0) from data source during recovery.

Causes:

The logCSN number is in the first record of each transaction in trail file.  If for some reason, the pump is stopped/abended at a record that is in the middle of a transaction, it will not have logCSN number, and the pump may abned with above error.

Solution:

A workaround is to find the record in local trail that is related to the last record processed by replicat.  Then the pump may be positioned to the next local record (presumably a starting record for a transaction) and start it.  If the record cannot be identifed (e.g., there is no information about last applied record at replicat), the pump may be positioned  to the begining of an earlier transaction, but this may introduce duplicate reocrds or missing some records.


steps to fix this issue:

step 1: find the EXTTRAILSOURCE path 

info P_FRD03

EXTRACT    P_FRED03  Last Started 2023-06-20 11:59   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:02 ago)
Log Read Checkpoint  File /opt/app/pxxxx3/acfs/ggs/ggs01/trails/A8/f3000000
                     First Record  RBA 0
-
step 2: get the available file from the location 

ls -lart /opt/app/pxxxx3/ggs/11.2.1.0.3/dirdat/f3*

output will be:
-rw-rw-rw- 1 ggs oinstall 97090686 Jul  7 05:03 /opt/app/pxxx4/ggs/11.2.1.0.3/dirdat/f3000299

step 3: apply the recent / latest file (Note: data lose will be there, so resyncing is required later.) get teh last 3 digit from that trail f3000299 file, which is 299.

stop P_FRD03

delete P_FRD03

ADD EXTRACT P_FRD03, EXTTRAILSOURCE /opt/app/pxxxx3/ggs/11.2.1.0.3/dirdat/f3

ADD RMTTRAIL /opt/app/puuuu23/acfs/ggs/ggs01/trails/A8/d3, EXTRACT P_FRD03

---
ALTER EXTRACT P_FRD03, EXTSEQNO 299, EXTRBA 0


start P_FRD03

info P_FRD03

EXTRACT    P_FRD03 Last Started 2023-06-20 12:44   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:02 ago)
Log Read Checkpoint  File /opt/app/pxxxx3/ggs/11.2.1.0.3/dirdat/f1067546
                     2023-07-07 04:00:16.000000  RBA 13416936



Conclusion: 

if RBA has generated any value, then your pump is working fine.








How to extract the data from informix db

 Step 1: login into db server and connect to db server.

Step 2: select the database and click info option to list all the tables in db.

Step 3: prepare shell script as below

vi data_extract.sh

dbaccess - - <<SQLSTMT

database <db name>;

unload to tablename.csv delimiter '|' select * from tablename;

SQLSTMT

#Save and close it

#example:

dbaccess - - <<SQLSTMT

database IBM;

unload to frm.csv delimiter '|' select * from frm;

unload to b2b.csv delimiter '|' select * from b2b;

unload to b2b_in.csv delimiter '|' select * from b2b_in;

unload to bays.csv delimiter '|' select * from bays;

unload to cef_ddm_inv.csv delimiter '|' select * from cef_ddm_inv;

SQLSTMT

#Save and close it

Step 4: chmod 775 data_extract.sh

Step 5: execute the file

./data_extract.sh

Tuesday, 30 July 2019

ORA-39346: data loss in character set conversion for object

ERROR:


Processing object type SCHEMA_EXPORT/TABLE/COMMENT
ORA-39346: data loss in character set conversion for object SCHEMA_EXPORT/TABLE/COMMENTProcessing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
ORA-39346: data loss in character set conversion for object SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
ORA-39346: data loss in character set conversion for object SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY

CAUSES:

Issue is occurring during the data migration from third party system to oracle database on Solaris server.

SOLUTION:

Apply this Oracle Patch 21342624 DATA LOSS DUE TO CHARACTER SET NOT SHOWING CORRECT SET OF OBJECTS DURING IMPORT

Wednesday, 19 April 2017

XAER_RMFAIL : Resource manager is unavailable

Error:
Caused by: javax.ejb.EJBException: Unexpected exception in com.retek.rib.app.getnext.impl.GetNextPublisherEjb.getNextAndPublishMessages:
com.retek.rib.binding.exception.PublishException: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource 'rib-rms-managed-datasource_RIBDomain': XAER_RMFAIL : Resource manager is unavailable
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1110)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:240)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:790)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1247)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1180)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:285)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:561)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:488)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1673)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1577)
at weblogic.jdbc.jta.DataSource.getConnectionInternal(DataSource.java:478)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:462)
at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:512)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491)
at com.retek.rib.app.getnext.impl.GetNextPublisherEjb.getConnection(GetNextPublisherEjb.java:161)


Causes: 
The issue is due to datasources connection are crashed when tx timeout or deadlock is occurred.

Solution: 
After applying this patch the above issue is getting resolve.
 

Patch 16843551: MERGE REQUEST ON TOP OF 

weblogic 10.3.6.0.0 


 

Monday, 11 July 2016

Error 404--Not Found in OEM cloud control 13C

ERROR:
Error 404--Not Found in oms 13C

CAUSES:
It might be due to several reasons like "database was not reachable" or "Admin Server might be down" or others

FINDING THE ROOT CAUSE:

Step 1: confirm whether database and listener are up.

Step 2: confirm whether the agent and oms servers are up.

[orawls@devs02 bin]$ export ORACLE_HOME=/u01/orawls/product/middleware/
[orawls@devs02 bin]$ export AGENT_HOME=/u01/orawls/product/Agent/agent_inst
[orawls@devs02 bin]$ $ORACLE_HOME/bin/emctl status oms            
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is intializing.
Context not fully initialized yet.
Check EM Server log file for details: /u01/orawls/product/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out
JVMD Engine is Up
BI Publisher Server is Up
[orawls@devs02 bin]$

[orawls@devs02 bin]$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 13.1.0.0.0
OMS Version            : (unknown)
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/orawls/product/Agent/agent_inst
Agent Log Directory    : /u01/orawls/product/Agent/agent_inst/sysman/log
Agent Binaries         : /u01/orawls/product/Agent/agent_13.1.0.0.0
Core JAR Location      : /u01/orawls/product/Agent/agent_13.1.0.0.0/jlib
Agent Process ID       : 13138
Parent Process ID      : 13101
Agent URL              : https://devs02.local.com:3872/emd/main/
Local Agent URL in NAT : https://devs02.local.com:3872/emd/main/
Repository URL         : https://devs02.local.com:4903/empbs/upload
Started at             : 2016-07-11 15:53:51
Started by user        : orawls
Operating System       : Linux version 2.6.32-504.el6.x86_64 (amd64)
Number of Targets      : 54
Last Reload            : (none)
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far : 0
Number of XML files pending upload          : 1,650
Size of XML files pending upload(MB)        : 2.29
Available disk space on upload filesystem    : 36.67%
Collection Status                                            : Collections enabled
Heartbeat Status                                             : OMS response is missing
Last attempted heartbeat to OMS                  : 2016-07-11 16:07:25
Last successful heartbeat to OMS                 : (none)

Next scheduled heartbeat to OMS                 : 2016-07-11 16:07:55



Step 3: Confirm whether all the ports are accessible

[orawls@devs02 logs]$ $ORACLE_HOME/bin/emctl status oms –details
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        : devs02.local.com
HTTP Console Port          : 7788
HTTPS Console Port         : 7802
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/orawls/product/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/orawls/product/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://devs02.local.com:7802/em
Upload URL: https://devs02.local.com:4903/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : devs02.local.com
Admin Server HTTPS Port: 7102
Admin Server is FAILED_NOT_RESTARTABLE
Admin Server Port is occupied by another process. Please stop process to free port.

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: devs02.bma.com
WebTier is Up
Oracle Management Server is intializing.
Context not fully initialized yet.
Check EM Server log file for details: /u01/orawls/product/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out
JVMD Engine is Up

BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Up

BI Publisher HTTP Managed Server Port   : 9701
BI Publisher HTTPS Managed Server Port  : 9803
BI Publisher HTTP OHS Port              : 9788
BI Publisher HTTPS OHS Port             : 9851
BI Publisher is locked.
BI Publisher Server named 'BIP' running at URL: https://devs02.local.com:9851/xmlpserver
BI Publisher Server Logs: /u01/orawls/product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/
BI Publisher Log        : /u01/orawls/product/gc_inst/user_projects/domains/GCDomain/servers/BIP/logs/bipublisher/bipublisher.log


SOLUTION:

Step 1: Stop all the oms services

[orawls@devs02 logs]$ $ORACLE_HOME/bin/emctl stop oms -all

Step 2: Get the process id of leftover processes if any.
ps -ef | grep EMGC_ADMINSERVER
ps -ef | grep EMGC_OMS1
ps -ef | grep java
ps -ef | grep opmn

Step 3: Kill those processes

$ kill -9 <PID>

Step 4: Start the node manager, Admin server & managed server related to OMS.

Step 5: Start OMS service and AGENT service.

$ $ORACLE_HOME/bin/emctl status oms
$ $AGENT_HOME/bin/emctl status agent




Tuesday, 19 March 2013

REIM ISSUES : Invoice matching system options is not defined. Please contact your system administrator.

ERROR IN REIM 13.2.4 :
==================

com.retek.reim.merch.utils.ReIMException: Invoice matching system options is not defined. Please contact your system administrator.
        at com.retek.reim.services.ReIMSystemOptionsService.select(ReIMSystemOptionsService.java:34)
        at com.retek.reim.ui.login.LoginAction.doForward(LoginAction.java:82)
        at com.retek.reim.ui.login.LoginAction.perform(LoginAction.java:60)
        at org.apache.struts.action.Action.execute(Action.java:420)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
        at com.retek.merch.utils.CustomRequestProcessor.processActionPerform(CustomRequestProcessor.java:23)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
2013-03-06 17:36:24,579 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] com.retek.reim.ui.login.LoginAction -
com.retek.reim.merch.utils.ReIMException: Could not complete login.
        at com.retek.reim.ui.login.LoginAction.perform(LoginAction.java:62)
        at org.apache.struts.action.Action.execute(Action.java:420)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
        at com.retek.merch.utils.CustomRequestProcessor.processActionPerform(CustomRequestProcessor.java:23)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
-

CAUSES :
========

This error is due to absence of data in IM_SYSTEM_OPTIONS table.

when the time of installing RMS application you have uncheck the inesrt demo data option for REIM. due to that, this issue is occuring.


solution :
======

conn RMS13/RMS13

insert into im_system_options (DEBIT_MEMO_SEND_DAYS,CLOSE_OPEN_RECEIPT_DAYS,COST_RESOLUTION_DUE_DAYS,QTY_RESOLUTION_DUE_DAYS,DOC_HIST_DAYS,DEBIT_MEMO_PREFIX_COST,DEBIT_MEMO_PREFIX_QTY,DEBIT_MEMO_PREFIX_TAX,CREDIT_MEMO_PREFIX_COST,CREDIT_MEMO_PREFIX_QTY,CREDIT_NOTE_REQ_PREFIX_COST,CREDIT_NOTE_REQ_PREFIX_QTY,CREDIT_NOTE_REQ_PREFIX_TAX,POST_DATED_DOC_DAYS,MAX_TOLERANCE_PCT,DAYS_BEFORE_DUE_DATE,DEFAULT_PAY_NOW_TERMS,CALC_TOLERANCE,TAX_VALIDATION_TYPE,TAX_DOCUMENT_CREATION_LVL,DEFAULT_TAX_HEADER,TAX_RESOLUTION_DUE_DAYS,CALC_TOLERANCE_IND,VPN_ITEM_LOOKUP,RECEIPT_WRITE_OFF_DAYS,DFLT_CBC_REASON_CODE,DFLT_CBQ_REASON_CODE,DFLT_CMC_REASON_CODE,DFLT_CMQ_REASON_CODE,MATCH_USING_REF_3,MATCH_USING_REF_4,NUM_TAX_ALLOW,TAX_VALIDATION_SRC,BALANCING_TOLERANCE,POST_BASED_ON_DOC_HEADER) values ('1','90','3','2','20','DMC','DMQ','DMT','CMC','CMQ','CNC','CNQ','CNT','10','100','3','163','10','RECON','ITEM','N','0','P','Y','0','','','','','Y','Y','N','RMS13','1','N');

commit;
-


NOW TRY LOGIN IN REIM APPLICATION.


Migration of extract and pump process from 11g to 19c in golden gate

 In this example, we are going to migrated golden gate from 11g to 19c. As part of migration, we need to perform the below steps. Step 1: Pr...