Install Goldengate Veridata,goldengateveridata
Goldengate Veridata 是oracle一款對比資料一致性的工具,支援Oracle、Terdata、Sql Server等資料庫。下面開始安裝:
整體架構:
安裝環境:
這裡我將Veridata Server直接安裝到agent1上面的:
Agent1:name:zbdba1OS:redhat 6.3IP:192.168.56.60Agent2:name:zbdba2OS:redhat 6.3IP:192.168.56.61
在agent1和agent2上面安裝veridata agent:
在安裝前確定資料庫已經開啟,監聽已經開啟
解壓:
[root@zbdba1 database]# unzip V35569-01.zip
進入agent目錄,配置參數檔案:
cp agent.properties.sample agent.properties[root@zbdba1 agent]# cat agent.propertiesserver.port=1261database.url=jdbc:oracle:thin:@localhost:1521:orcl11gserver.driversLocation = driversserver.jdbcDriver=ojdbc6.jardatabase.transaction.isolation=READ_COMMITTED
配置JRE:
[root@zbdba1 agent]# cat /root/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport JAVA_HOME1=/jre1.7.0_75/binexport JAVA_HOME=/jre1.7.0_75/export PATH=$PATH:$JAVA_HOME:$JAVA_HOME1
啟動agent
[root@zbdba1 agent]# ./agent.sh start
監控記錄檔:
[root@zbdba1 ~]# tail -100f /database/agent/veridata-agent.log
[root@zbdba1 agent]# ps -ef |grep agentroot 2217 2198 0 22:11 pts/3 00:00:00 tail -100f /database/agent/veridata-agent.logroot 2546 1 0 22:36 pts/0 00:00:03 /jre1.7.0_75//bin/java -Xmx1024M -Xms1024M -Djava.awt.headless=true -XX:+UseParallelGC -jar /database/agent/JavaAgent.jarroot 2760 1491 0 23:05 pts/0 00:00:00 grep agent
在agent2上面執行一樣的操作。
在agent1上安裝veridata server:
[root@zbdba1 database]# unzip V35572-01.zip[root@zbdba1 database]# export DISPLAY=192.168.56.1:0.0[root@zbdba1 database]# ./GoldenGate_Veridata_redhatAS40_x64.sh根據圖形介面一步一步安裝即可
安裝完成查看veridata server進程是否啟動:
[root@zbdba1 database]# ps -ef |grep veridataroot 1770 1750 0 21:27 pts/2 00:00:00 tail -1000f veridataweb.logroot 1852 1 0 21:29 pts/1 00:00:35 /opt/Oracle_GoldenGate_Veridata/jre/bin/java -Xms1024m -Xmx1024m -Djava.awt.headless=true -Dveridata.home=/opt/Oracle_GoldenGate_Veridata -Dveridata.log.dir=/opt/Oracle_GoldenGate_Veridata/shared/logs -Dveridata.log.file=veridataweb.log -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/Oracle_GoldenGate_Veridata/web/conf/logging.properties -Djava.endorsed.dirs=/opt/Oracle_GoldenGate_Veridata/web/common/endorsed -classpath :/opt/Oracle_GoldenGate_Veridata/web/bin/bootstrap.jar:/opt/Oracle_GoldenGate_Veridata/web/bin/commons-logging-api.jar -Dcatalina.base=/opt/Oracle_GoldenGate_Veridata/web -Dcatalina.home=/opt/Oracle_GoldenGate_Veridata/web -Djava.io.tmpdir=/opt/Oracle_GoldenGate_Veridata/web/temp org.apache.catalina.startup.Bootstrap startroot 2217 2198 0 22:11 pts/3 00:00:00 tail -100f /database/agent/veridata-agent.logroot 2778 1491 0 23:07 pts/0 00:00:00 grep veridata
查看日誌情況:
[root@zbdba1 logs]# tail -100f /opt/Oracle_GoldenGate_Veridata/shared/logs/veridataweb.logINFO (2015-03-08 21:27:09,179) [AbstractEntityManagerFactoryBean:destroy, line 387] - Closing JPA EntityManagerFactory for persistence unit 'VeridataServer'INFO (2015-03-08 21:29:22,188) [ContextLoader:initWebApplicationContext, line 182] - Root WebApplicationContext: initialization startedINFO (2015-03-08 21:29:22,279) [AbstractApplicationContext:prepareRefresh, line 447] - Refreshing Root WebApplicationContext: startup date [Sun Mar 08 21:29:22 EDT 2015]; root of context hierarchyINFO (2015-03-08 21:29:22,367) [XmlBeanDefinitionReader:loadBeanDefinitions, line 315] - Loading XML bean definitions from class path resource [context-dao.xml]INFO (2015-03-08 21:29:23,568) [XmlBeanDefinitionReader:loadBeanDefinitions, line 315] - Loading XML bean definitions from class path resource [context-bu.xml]INFO (2015-03-08 21:29:23,915) [VeridataConfig:<init>, line 99] - No override /veridata.cfg config fileINFO (2015-03-08 21:29:23,946) [VeridataConfig:<init>, line 124] - veridata.cfg Location: /opt/Oracle_GoldenGate_Veridata/web/webapps/veridata/WEB-INF/classes/../../../../../shared/conf/veridata.cfgINFO (2015-03-08 21:29:24,281) [DefaultListableBeanFactory:preInstantiateSingletons, line 532] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f4275d4: defining beans [serverPassword,repositoryPassword,connectionWallet,agentPoolManager,comparisonReportsDAO,veridataConfig,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,com.goldengate.veridata.util.VeridataPropertyConfigurer#0,myEmf,veridataDataSource,myTxManager,connectionDAO,jobDAO,profileDAO,finishedStatsDAO,groupDAO,comparePairDAO,userPreferencesDAO,favoriteDAO,performanceStatsDAO,veridataControlDAO,adminDAO,connectionManager,jobManager,groupManager,comparePairManager,profileManager,userPreferencesManager,favoriteTaskManager,runManager,finishedJobsManager,metaLookupManager,oosReportsManager,performanceStatsManager,veridataControlManager,comparisonReportsManager]; root of factory hierarchyINFO (2015-03-08 21:29:26,438) [LocalContainerEntityManagerFactoryBean:createNativeEntityManagerFactory, line 221] - Building JPA container EntityManagerFactory for persistence unit 'VeridataServer'INFO (2015-03-08 21:29:28,118) [SorterManager:<init>, line 73] - Total sort memory is 766mINFO (2015-03-08 21:29:28,119) [SorterManager:<init>, line 84] - Maximum comparison memory is 100mINFO (2015-03-08 21:29:28,119) [SorterManager:<init>, line 89] - The maximum number of concurrent writes is 4INFO (2015-03-08 21:29:28,120) [SorterManager:<init>, line 92] - The maximum number of concurrent reads is 4INFO (2015-03-08 21:29:28,203) [ContextLoader:initWebApplicationContext, line 202] - Root WebApplicationContext: initialization completed in 6012 msINFO (2015-03-08 21:29:28,728) [VersionBean:<init>, line 40] - loading jar:file:/opt/Oracle_GoldenGate_Veridata/web/webapps/veridata/WEB-INF/lib/vericom.jar!/veridata-version.propertiesINFO (2015-03-08 21:29:28,728) [VeridataContextListener:contextInitialized, line 96] - Oracle GoldenGate Veridata Server - Version 11.2.1.0 OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625INFO (2015-03-08 21:29:28,907) [VeridataSessionLogger:log, line 97] - EclipseLink, version: Eclipse Persistence Services - 2.1.2.v20101206-r8635INFO (2015-03-08 21:29:37,094) [VeridataSessionLogger:log, line 97] - file:/opt/Oracle_GoldenGate_Veridata/web/webapps/veridata/WEB-INF/lib/veridata-server.jar_VeridataServer login successful
使用瀏覽器登入veridata
http://192.168.56.60:8830/veridata/
輸入使用者名稱和密碼登入
點擊右側Connection Configuration
new
建立完成後,點擊右側group Configuration
new
建立完成後,點擊edit,點擊右側Go to Compare Pair Configuration .
按實際情況選擇表進行對比
完成之後,點擊job Configuration
new
run job
查看report可以知道具體錯誤
以後啟動veridata的步驟:
啟動agent:[root@zbdba1 agent]# ./agent.sh start[root@zbdba2 agent]# ./agent.sh start啟動server:[root@zbdba1 bin]# pwd/opt/Oracle_GoldenGate_Veridata/web/bin[root@zbdba1 bin]# ./startup.sh CATALINA_HOME: /opt/Oracle_GoldenGate_Veridata/webJRE_HOME: /opt/Oracle_GoldenGate_Veridata/jreJAVA_OPTS: -Xms1024m -Xmx1024m -Djava.awt.headless=true -Dveridata.home=/opt/Oracle_GoldenGate_Veridata -Dveridata.log.dir=/opt/Oracle_GoldenGate_Veridata/shared/logs -Dveridata.log.file=veridataweb.logUsing CATALINA_BASE: /opt/Oracle_GoldenGate_Veridata/webUsing CATALINA_HOME: /opt/Oracle_GoldenGate_Veridata/webUsing CATALINA_TMPDIR: /opt/Oracle_GoldenGate_Veridata/web/tempUsing JRE_HOME: /opt/Oracle_GoldenGate_Veridata/jre