【正文】
into database.ADD CHECKPOINTTABLEGGSCI (target) 3 ADD CHECKPOINTTABLENo checkpoint table specified, using GLOBALS specification ()...Successfully created checkpoint table .ADD REPLICAT REP01, EXTTRAIL ./dirdat/wmGGSCI (target) 4 ADD REPLICAT REP01, EXTTRAIL ./dirdat/wmREPLICAT added.啟動(dòng)目標(biāo)數(shù)據(jù)庫的復(fù)制進(jìn)程START REPLICAT REP01GGSCI (target) 5 START REPLICAT REP01Sending START request to MANAGER ...REPLICAT REP01 startingINFO ALLGGSCI (target) 6 INFO ALLProgram Status Group Lag Time Since ChkptMANAGER RUNNING REPLICAT RUNNING REP01 00:00:00 00:00:01 VIEW REPORT REP01GGSCI (target) 7 VIEW REPORT REP01*********************************************************************** Oracle GoldenGate Delivery for Oracle Version Build 078 Linux, x86, 32bit (optimized), Oracle 10 on Jul 28 2010 16:38:15 Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved. Starting at 20110222 21:39:05***********************************************************************Operating System Version:LinuxVersion 1 SMP Fri Jul 25 14:41:56 EDT 2008, Release Node: targetMachine: i686 soft limit hard limitAddress Space Size : unlimited unlimitedHeap Size : unlimited unlimitedFile Size : unlimited unlimitedCPU Time : unlimited unlimitedProcess id: 28294Description: ************************************************************************* Running with the following parameters *************************************************************************REPLICAT REP01USERID gate02, PASSWORD ******HANDLECOLLISIONSASSUMETARGETDEFSDISCARDFILE ./dirrpt/, PURGEMAP gate01.*, TARGET gate02.*。CACHEMGR virtual memory values (may have been adjusted)CACHEBUFFERSIZE: 64KCACHESIZE: 512MCACHEBUFFERSIZE (soft max): 4MCACHEPAGEOUTSIZE (normal): 4MPROCESS VM AVAIL FROM OS (min): 1GCACHESIZEMAX (strict force to disk): 881MDatabase Version:Oracle Database 10g Enterprise Edition Release ProdPL/SQL Release ProductionCORE ProductionTNS for Linux: Version ProductionNLSRTL Version ProductionDatabase Language and Character Set:NLS_LANG environment variable specified has invalid format, default value will be used.NLS_LANG environment variable not set, using default value .NLS_LANGUAGE = AMERICAN NLS_TERRITORY = AMERICA NLS_CHARACTERSET = ZHS16GBK Warning: your NLS_LANG setting does not match database server language setting.Please refer to user manual for more information.************************************************************************* Run Time Messages *************************************************************************Opened trail file ./dirdat/wm000000 at 20110222 21:39:07GGSCI (target) 8檢查同步結(jié)果1在源數(shù)據(jù)庫插入數(shù)據(jù)conn gate01 /gate01@2 如果出錯(cuò),可以查看源數(shù)據(jù)庫EXT0PUMP01,或者目標(biāo)數(shù)據(jù)庫上的REP01進(jìn)程的錯(cuò)誤。如:VIEW REPORT EXT01VIEW REPORT PUMP01VIEW REPORT REP01如果修改進(jìn)程的配置文件,需要關(guān)閉進(jìn)程,然后重新啟動(dòng)才有效。把源數(shù)據(jù)庫的DDL修改同步到目標(biāo)數(shù)據(jù)庫中在源數(shù)據(jù)庫端關(guān)閉數(shù)據(jù)庫的回收站show parameter recyclealter system set recyclebin=off。SQL show parameter recycleNAME TYPE VALUE buffer_pool_recycle stringdb_recycle_cache_size big integer 0recyclebin string onSQL alter system set recyclebin=off。System altered.SQL show parameter recycleNAME TYPE VALUE buffer_pool_recycle stringdb_recycle_cache_size big integer 0recyclebin string OFF編輯源數(shù)據(jù)庫參數(shù)文件GLOBALSEDIT PARAMS ./GLOBALSGGSCHEMA gate01 gate01支持DDL同步的用戶注意:要退出GGSCI命令行,再進(jìn)入GGSCI命令行,使得全局文件生效。在源數(shù)據(jù)庫上創(chuàng)建gate01所需要的表sqlplus / as sysdbaGRANT EXECUTE ON UTL_FILE TO gate01。SQL conn / as sysdbaConnected.SQL GRANT EXECUTE ON UTL_FILE TO gate01。Grant succeeded.@marker_setup 選擇支持DDL同步的用戶gate01SQL @marker_setup Marker setup scriptYou will be prompted for the name of a schema for the GoldenGate database objects.NOTE: The schema must be created prior to running this script.NOTE: Stop all DDL replication before starting this installation.Enter GoldenGate schema name:gate01Marker setup table script plete, running verification script...Please enter the name of a schema for the GoldenGate database objects:Setting schema name to GATE01MARKER TABLEOKMARKER SEQUENCEOKScript plete.SQL @ddl_setup 選擇支持DDL同步的用戶gate01,選擇INITIALSETUP,然后選擇YES。 (注意安裝的類型有兩種:INITIALSETUP、NORMAL。當(dāng)安裝DDL復(fù)制操作或重新安裝DDL復(fù)制操作選INITIALSETUP,當(dāng)更新DDL復(fù)制操作選NORMAL。) (如果之前ddl安裝包安裝在其它用戶下,而現(xiàn)在又想安裝到與之前不同的用戶,需要使用@,再運(yùn)行@ddl_setup安裝包。)SQL @ddl_setupGoldenGate DDL Replication setup scriptVerifying that current user has privileges to install DDL Replication...Checking user sessions...There are 2 user sessions currently open (first 3 are shown):PROGRAM OS_USER USERNAME SID SER PID