Adding New Extract in Oracle GoldenGate
Adding New Extract in Oracle GoldenGate
<<db_loging_alias>> -- user id alias in credentialstore
<<ggadmin>> -- goldengate admin user name in database
<<ggadmin_password>> -- ggadmin user's password
<<srcdb_conn_string>> -- source database connection string(tnsnames)
<<trgdb_conn_string>> -- target database connection string(tnsnames)
<<src_db>> -- source container name valid for CDB environment (either db name or container name)
<<extract_name>> -- Extract process name
<<ext_trail_path>> -- extract trail or local trail path
<<local_trail_name>> -- Local trail file name
<<oh_path>> -- ORACLE_HOME path
<<tns_admin_path>> -- TNS_ADMIN path
<<ora_sid>> -- ORACLE_SID
<<nls_lang>> -- NLS LANGUAGE default 'AMERICAN_AMERICA.AL32UTF8'
<<ora_uniq_name>> -- DB unique name
<<src_schema_name>> -- Source schema name
<<table_name>> -- Table name
<<str_pool_size>> -- Set max stream pool need to use by extract
Steps to Add New Extract
1. Adding New Extract
DBLOGIN useridalias <<db_loging_alias>>
DBLOGIN userid <<ggadmin>>@<<db_conn_string>>,password <<ggadmin_password>>
2. Add Extract Process
ADD EXTRACT <<extract_name>>, INTEGRATED TRANLOG, BEGIN NOW
REGISTER EXTRACT <<extract_name>>, DATABASE CONTAINER (<<src_db>>) -- container environment
REGISTER EXTRACT <<extract_name>>, DATABASE -- non-cdb environment
ADD EXTTRAIL <<ext_trail_path>>/<<local_trail_name>>, EXTRACT <<extract_name>>
3. Create Parameter File
GGSCI> edit param <<extract_name>>
EXTRACT <<extract_name>>
------------------------------------------
-- Environment variable settings
------------------------------------------
--SETENV (ORACLE_SID = '<<ora_sid>>')
--SETENV (NLS_LANG = '<<nls_lang>>')
--SETENV (ORACLE_UNQNAME = '<<ora_uniq_name>>')
SETENV (ORACLE_HOME = '<<oh_path>>')
SETENV (TNS_ADMIN='<<tns_admin_path>>')
----------------------------------------
-- Database login info
----------------------------------------
userid <<ggadmin>>@<<db_conn_string>>,password <<ggadmin_password>>
---------------------------------------------
--Transaction log interaction params
---------------------------------------------
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE <<str_pool_size>>)
----------------------------------------
--Trail file info
----------------------------------------
EXTTRAIL <<ext_trail_path>>/<<local_trail_name>>
----------------------------------------
-- DDL transaction controlling
----------------------------------------
DDL INCLUDE ALL
-- or
-- ddl capture for replication enable objects alone
DDL INCLUDE
OBJNAME <<src_schema_name>>.<<table_name>> &
OBJNAME <<src_schema_name>>.<<table_name>> &
EXCLUDE OBJTYPE <<object_type>> &
EXCLUDE OPTYPE <<oper_type>> &
EXCLUDE INSTR '<<in_string>>'
-----------------------------------------
-- CDC object valid for container db
-----------------------------------------
SOURCECATALOG <<src_db>> -- valid for container database
TABLE <<src_schema_name>>.<<table_name>>;
-- or
TABLE <<src_schema_name>>.*;
-- TABLEEXCLUDE <<src_schema_name>>.<<pattern>>;
Comments
Post a Comment