下载server和jagent
安装jagent
[oracle@localhost oggveridata]$ ls -l
total 147780
-rw-r--r-- 1 oracle dba 143131697 Aug 21 17:53 GoldenGate_Veridata_redhatAS40_x86.zip
-rw-r--r-- 1 oracle dba 8031559 Aug 24 09:27 V35569-01.zip
[oracle@localhost oggveridata]$ unzip V35569-01.zip
[oracle@localhost V35569-01]$ mv agent/ ../
[oracle@localhost oggveridata]$ ls -l
total 147788
drwxr-xr-x 6 oracle dba 4096 Aug 24 09:28 agent
-rw-r--r-- 1 oracle dba 143131697 Aug 21 17:53 GoldenGate_Veridata_redhatAS40_x86.zip
drwx------ 2 oracle dba 4096 Aug 24 09:28 V35569-01
-rw-r--r-- 1 oracle dba 8031559 Aug 24 09:27 V35569-01.zip
[oracle@localhost oggveridata]$ cd agent/
[oracle@localhost agent]$ cp agent.properties.sample agent.properties
[oracle@localhost agent]$ vim agent.properties
[oracle@localhost agent]$ cat agent.properties |grep -v ^#|grep -v ^$
server.port=5577
database.url=jdbc:oracle:thin:@localhost:1521:orasql
server.driversLocation = drivers
server.jdbcDriver=ojdbc6.jar
database.transaction.isolation=READ_COMMITTED
[oracle@localhost agent]$ ./agent.sh start
[oracle@localhost agent]$ tail -100 veridata-agent.log
INFO:2013-08-24 09:36:58,745 (main) - Veridata Agent Version 11.2.1.0 OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800 [VeriAgentVersion:logVersion, line 33]
INFO:2013-08-24 09:36:59,069 (main) - Veridata Agent starting on localhost.localdomain port 5577 [VeridataAgent:serve, line 141]
INFO:2013-08-24 09:38:38,968 () - Starting session 1 [VeridataAgent$Handler:run, line 313]
INFO:2013-08-24 09:38:38,981 (Session: 1) - Received command: STOP A [VeridataAgent$Handler:getRequest, line 455]
INFO:2013-08-24 09:38:43,689 (main) - Veridata Agent stopped on port 5577 [VeridataAgent:serve, line 175]
INFO:2013-08-24 09:38:43,692 (main) - Shutdown request complete [VeridataAgent:processAgentResponse, line 194]
ERROR:2013-08-24 09:38:43,720 (Session: 1) - IO Error encountered: null [VeridataAgent$Handler:run, line 362]
java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:473)
at com.goldengate.veridata.agent.VeridataAgent$Handler.getRequest(VeridataAgent.java:511)
at com.goldengate.veridata.agent.VeridataAgent$Handler.run(VeridataAgent.java:326)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
INFO:2013-08-24 09:38:43,721 (Session: 1) - Session 1 stopped [VeridataAgent$Handler:run, line 371]
INFO:2013-08-24 09:38:51,707 (main) - Veridata Agent Version 11.2.1.0 OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800 [VeriAgentVersion:logVersion, line 33]
INFO:2013-08-24 09:38:51,740 (main) - Veridata Agent starting on localhost.localdomain port 5577 [VeridataAgent:serve, line 141]
total 147780
-rw-r--r-- 1 oracle dba 143131697 Aug 21 17:53 GoldenGate_Veridata_redhatAS40_x86.zip
-rw-r--r-- 1 oracle dba 8031559 Aug 24 09:27 V35569-01.zip
[oracle@localhost oggveridata]$ unzip V35569-01.zip
[oracle@localhost V35569-01]$ mv agent/ ../
[oracle@localhost oggveridata]$ ls -l
total 147788
drwxr-xr-x 6 oracle dba 4096 Aug 24 09:28 agent
-rw-r--r-- 1 oracle dba 143131697 Aug 21 17:53 GoldenGate_Veridata_redhatAS40_x86.zip
drwx------ 2 oracle dba 4096 Aug 24 09:28 V35569-01
-rw-r--r-- 1 oracle dba 8031559 Aug 24 09:27 V35569-01.zip
[oracle@localhost oggveridata]$ cd agent/
[oracle@localhost agent]$ cp agent.properties.sample agent.properties
[oracle@localhost agent]$ vim agent.properties
[oracle@localhost agent]$ cat agent.properties |grep -v ^#|grep -v ^$
server.port=5577
database.url=jdbc:oracle:thin:@localhost:1521:orasql
server.driversLocation = drivers
server.jdbcDriver=ojdbc6.jar
database.transaction.isolation=READ_COMMITTED
[oracle@localhost agent]$ ./agent.sh start
[oracle@localhost agent]$ tail -100 veridata-agent.log
INFO:2013-08-24 09:36:58,745 (main) - Veridata Agent Version 11.2.1.0 OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800 [VeriAgentVersion:logVersion, line 33]
INFO:2013-08-24 09:36:59,069 (main) - Veridata Agent starting on localhost.localdomain port 5577 [VeridataAgent:serve, line 141]
INFO:2013-08-24 09:38:38,968 () - Starting session 1 [VeridataAgent$Handler:run, line 313]
INFO:2013-08-24 09:38:38,981 (Session: 1) - Received command: STOP A [VeridataAgent$Handler:getRequest, line 455]
INFO:2013-08-24 09:38:43,689 (main) - Veridata Agent stopped on port 5577 [VeridataAgent:serve, line 175]
INFO:2013-08-24 09:38:43,692 (main) - Shutdown request complete [VeridataAgent:processAgentResponse, line 194]
ERROR:2013-08-24 09:38:43,720 (Session: 1) - IO Error encountered: null [VeridataAgent$Handler:run, line 362]
java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:473)
at com.goldengate.veridata.agent.VeridataAgent$Handler.getRequest(VeridataAgent.java:511)
at com.goldengate.veridata.agent.VeridataAgent$Handler.run(VeridataAgent.java:326)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
INFO:2013-08-24 09:38:43,721 (Session: 1) - Session 1 stopped [VeridataAgent$Handler:run, line 371]
INFO:2013-08-24 09:38:51,707 (main) - Veridata Agent Version 11.2.1.0 OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800 [VeriAgentVersion:logVersion, line 33]
INFO:2013-08-24 09:38:51,740 (main) - Veridata Agent starting on localhost.localdomain port 5577 [VeridataAgent:serve, line 141]
安装server
[oracle@localhost oggveridata]$ unzip GoldenGate_Veridata_redhatAS40_x86.zip
切换到图形界面
[oracle@localhost oggveridata]$ ./GoldenGate_Veridata_redhatAS40_x86.sh
选择安装目录 /u01/ogg/oggveridata
data目录 /u01/ogg/oggveridata/shared/data
create users 下一步
管理员用户 oggveridata/oracle
数据库类型 oracle
确认oracle目录
现在TNS ORASQL
现在创建新用户
填写一个dba权限的用户及密码,用于创建用户
用户名和密码 oggdata/oracle
表空间,根据自己的环境来设置
开始安装
安装完成。
http://192.168.3.142:8830/veridata/
登录后,左侧,connection configuration,右侧,new
输入connection name下一步
输入信息,并验证。下一步
完成后,安装同样的方式新建另一个connection
再回到右侧的group configuration,new
现在目标端和源端
完成后进入右侧的edit,点击右边的Go to Compare Pair Configuration …,选择手工mapping
左右2侧选择对应的表后,右下角Generate Compare Pair.
全部选择完后,点击右上角preview
sava
保存后即可再 existing compare pairs中看到
再回到右侧的job configuration,new
输入job名下一步
然后回到job,run起来
2个表好像必须有唯一索引,不然会报错。
alter table ogg_obj add constraint ogg_obj_pr primary key(object_id);
alter table ogg_seg add constraint ogg_seg_pr primary key(SEGMENT_NAME,PARTITION_NAME);
下次启动Veridata过程如下:
][oracle@localhost bin]$ pwd
/u01/ogg/oggveridata/web/bin
[oracle@localhost bin]$ ./veridata_web.sh start
CATALINA_HOME: /u01/ogg/oggveridata/web
JRE_HOME: /u01/ogg/oggveridata/jre
JAVA_OPTS: -Xms1024m -Xmx1024m -Djava.awt.headless=true -Dveridata.home=/u01/ogg/oggveridata -Dveridata.log.dir=/u01/ogg/oggveridata/shared/logs -Dveridata.log.file=veridataweb.log
Using CATALINA_BASE: /u01/ogg/oggveridata/web
Using CATALINA_HOME: /u01/ogg/oggveridata/web
Using CATALINA_TMPDIR: /u01/ogg/oggveridata/web/temp
Using JRE_HOME: /u01/ogg/oggveridata/jre
[oracle@localhost agent]$ ./agent.sh start
[oracle@localhost agent]$ pwd
/u01/ogg/oggveridata/agent
/u01/ogg/oggveridata/web/bin
[oracle@localhost bin]$ ./veridata_web.sh start
CATALINA_HOME: /u01/ogg/oggveridata/web
JRE_HOME: /u01/ogg/oggveridata/jre
JAVA_OPTS: -Xms1024m -Xmx1024m -Djava.awt.headless=true -Dveridata.home=/u01/ogg/oggveridata -Dveridata.log.dir=/u01/ogg/oggveridata/shared/logs -Dveridata.log.file=veridataweb.log
Using CATALINA_BASE: /u01/ogg/oggveridata/web
Using CATALINA_HOME: /u01/ogg/oggveridata/web
Using CATALINA_TMPDIR: /u01/ogg/oggveridata/web/temp
Using JRE_HOME: /u01/ogg/oggveridata/jre
[oracle@localhost agent]$ ./agent.sh start
[oracle@localhost agent]$ pwd
/u01/ogg/oggveridata/agent