is00hcw / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 1 forks source link

Oracle extractor problem #1099

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. ./setupCDC.sh with the following config file

service=SCHEMAAPP
sys_user=sys
sys_pass="syspwd2015"
enable_archivelog=0
source_user=W_SRC_SCHEMAAPP
pub_tablespace=0
pub_user=W_PUB_SCHEMAAPP
pub_password=shouldrandom
tungsten_user=W_USR_SCHEMAAPP
tungsten_pwd=shouldrandom
delete_publisher=1
delete_subscriber=1
cdc_type=HOTLOG_SOURCE
specific_tables=0
specific_path=

2. tpm install SCHEMAAPP \
                --datasource-oracle-service="SRCDB" \
                --datasource-type=oracle \
                --master=172.16.1.3 \
                --members=172.16.1.3 \
                --property=replicator.extractor.dbms.transaction_frag_size=10 \
                --property=replicator.global.extract.db.password=shouldrandom \
                --property=replicator.global.extract.db.user=W_USR_SCHEMAAPP \
                --replication-host=172.16.1.3 \
                --replication-password=shouldrandom \
                --replication-port=1521 \
                --replication-user=W_PUB_SCHEMAAPP \
                --role=master \
                --start-and-report=true \
                --svc-table-engine=CDCASYNC \
                --rmi-port=10000 \
                --thl-port=2112 \
                --install-directory=/opt/continuent/master/SRCDB/SCHEMAAPP

Which gives me the following output

NOTE  >> Data service(s) schemaapp updated in 
/opt/continuent/tungsten-replicator-3.0.0-524/deploy.cfg
............................
WARN  >> 172_16_1_3 >> Linux swappiness is currently set to 60, on restart it 
will be 60, consider setting this to 10 or under to avoid swapping. (
SwappinessCheck)
........................................................
Getting replication status on 172.16.1.3
.......
ERROR >> 172_16_1_3 >> Failed: 
/opt/continuent/master/srcdb/SCHEMAAPP/releases/tungsten-replicator-3.0.0-524_pi
d44584/tungsten-replicator/bin/trepc
tl -port 10000 services, RC: 1, Result: ..........Operation failed: null, No 
STDERR
#####################################################################
# Commitment failed
#####################################################################
#####################################################################
# Errors for 172_16_1_3
#####################################################################
ERROR >> 172_16_1_3 >> Failed: 
/opt/continuent/master/srcdb/SCHEMAAPP/releases/tungsten-replicator-3.0.0-524_pi
d44584/tungsten-replicator/bin/trepc
tl -port 10000 services, RC: 1, Result: ..........Operation failed: null, No 
STDERR

NOTE  >> Check the status of all hosts before taking action
.....

Expected output
Run the replicators without any issue

...

Actual output:

com.continuent.tungsten.replicator.ReplicatorException: Failed to execute query 
BEGIN DBMS_CDC_SUBSCRIBE.CREATE_SUBSCRIPTION(change_set_name => 
'TUNGSTEN_CS_SCHEMAAPP', description => 'Change data used by Tungsten', 
subscription_name => 'TUNGSTEN_SUB_SCHEMAAPP');end;
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.extractor.oracle.OracleCDCReaderThread.execut
eQuery(OracleCDCReaderThread.java:379)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.extractor.oracle.OracleCDCReaderThread.execut
eQuery(OracleCDCReaderThread.java:413)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.extractor.oracle.OracleCDCReaderThread.prepar
e(OracleCDCReaderThread.java:316)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.extractor.oracle.OracleCDCReaderExtractor.pre
pare(OracleCDCReaderExtractor.java:181)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.extractor.ExtractorWrapper.prepare(ExtractorW
rapper.java:283)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   at 
com.continuent.tungsten.replicator.conf.ReplicatorRuntime.preparePlugin(Replicat
orRuntime.java:1301)
INFO   | jvm 1    | 2015/02/27 13:02:27 |   ... 14 more
INFO   | jvm 1    | 2015/02/27 13:02:27 | Caused by: java.sql.SQLException: SQL 
string is not Query

Im attaching the trepsvc.log

...

Version

Tungsten 3.0.0-524

  1* select * from v$version                                                                       

BANNER                                                                          
     CON_ID        
--------------------------------------------------------------------------------
 ----------        
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production    
          0        
PL/SQL Release 12.1.0.2.0 - Production                                          
          0        
CORE    12.1.0.2.0      Production                                              
                  0
TNS for Linux: Version 12.1.0.2.0 - Production                                  
          0        
NLSRTL Version 12.1.0.2.0 - Production                                          
          0        

...

On what operating system?

cat /etc/centos-release  
CentOS release 6.6 (Final)     
...
Thank you!

Original issue reported on code.google.com by estebanf...@gmail.com on 27 Feb 2015 at 9:10

Attachments:

GoogleCodeExporter commented 9 years ago
The problem seems to be that you are using Oracle 12G, which does not support 
the CDC mechanism Tungsten uses to extract data from Oracle.   At this point 
there is not an easy fix.  Either you revert to 11G or there needs to be a new 
extractor. 

Original comment by robert.h...@continuent.com on 28 Feb 2015 at 4:07

GoogleCodeExporter commented 9 years ago
Thank you for your support,

It seems that the same Issue replicates on Oracle 11g

SQL> select * from v$version;                                                   

│3_pid32643/tungsten-r
                                                                                                                                                  │eplicator/bin/trepctl
BANNER                                                                          
                                                                  │ -port 
10000 services
--------------------------------------------------------------------------------
                                                                  │, RC: 256, 
Result: ..
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production    

│........Operation fai
PL/SQL Release 11.2.0.4.0 - Production                                          
                                                                  │led: null, 
Errors:
CORE    11.2.0.4.0      Production                                              
                                                                  │
TNS for Linux: Version 11.2.0.4.0 - Production                                  
                                                                  │NOTE  >> 
Check the st
NLSRTL Version 11.2.0.4.0 - Production      

I'm attaching the files:
setupCDC_SCOTT.log execution results from setupCDC.sh
install_master_SCOTT.log, results of the tpm install command

One thing that I can notice is that in the trepsvc.log file line 133 I see a 
"java.sql.SQLException: SQL string is not Query" error, which triggers the 
whole error, I've tried to manually subscribe the tungsten user to the CDC 
subscription, but tpm also tries to do it itself.

Best Regards!

Original comment by estebanf...@gmail.com on 28 Feb 2015 at 5:37

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, the v$version output is:

SQL> select * from v$version;                                                   

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                                          

Original comment by estebanf...@gmail.com on 28 Feb 2015 at 5:38