1. OGG Veridata Server体系结构
1.1 OGG Veridata Server架构图
1.2 OGG Veridata Server安装路径图
Table 1-2 Oracle GoldenGate Veridata Installation Roadmap
Task |
Description |
Documentation |
Verify your system environment and install the prerequisites |
Before beginning the installation, verify that the minimum system and network requirements are met. |
See Oracle GoldenGate Veridata Prerequisites and System Requirements . |
Obtain the appropriate distribution for your installation type |
The Oracle GoldenGate Veridata distribution. For Oracle GoldenGate Veridata 12.2.1.4.0, the installer is fmw_12.2.1.4.0_ogg.jar . |
|
Determine your installation directories |
Verify that the directories that will need to be created can be created or accessed by the installer, and exist on systems that meet the minimum requirements. |
See "Understanding the Recommended Directory Structure" in Planning an Installation of Oracle Fusion Middleware. |
Install Oracle GoldenGate Veridata |
Installing software transfers the software to your system and creates the Oracle home directory. |
For more information about the install types available during installation, see Understanding Oracle GoldenGate Veridata Distribution . For installation instructions, see Installing Oracle GoldenGate Veridata . |
Create Oracle GoldenGate Veridata Repository schema. |
Use the Repository Creation Utility (RCU) to create the Repository database schemas. |
See Creating the Oracle GoldenGate Veridata Repository Schema . |
Create and configure your domain |
Use the configuration wizard to create and configure your domain. |
See Configuring Domain for Oracle GoldenGate Veridata to create the domain. |
Apply patch using OPatch |
Use OPatch to apply latest bundle patch, and execute repository patch if applicable. |
See Next Steps After Configuring an Oracle GoldenGate Veridata Domain . |
1.3 OGG Veridata Server目录结构
Table 6-1 Directories in an Oracle GoldenGate Veridata Installation
Directory Variable |
Directory Path |
ORACLE_HOME |
/ install_location /Oracle_Home . This is the home directory for the Oracle Fusion Middleware products. |
VERIDATA_PRODUCT_HOME |
/ ORACLE_HOME /veridata |
AGENT_ORACLE_HOME |
/ VERIDATA_PRODUCT_HOME /agent |
AGENT_DEPLOY_LOCATION |
This is the location where the Oracle GoldenGate Veridata Agent is deployed. Note that this location should be outside the ORACLE_HOME. |
1.4 OGG Veridata支持数据库
1.4.1 支持比较的数据库
l Oracle, ADW, ATP, DBCS
l SQL Server
l MySQL
l Teradata
l BigData Hive
l DB2 for i, DB2 LUW, and DB2 z/OS
l Informix
l Non Stop (Enscribe, SQL/MP, SQL/MX)
l Sybase Adaptive Server Enterprise (ASE)
1.4.2 支持与不支持repair的数据库
l Oracle GoldenGate Veridata supports the following databases for repair functionality:
ü Oracle, ADW, ATP, DBCS
ü SQL Server
ü Teradata
ü DB2 for i, DB2 LUW, and DB2 z/OS
ü Informix
ü Sybase Adaptive Server Enterprise (ASE)
ü MySQL
l Oracle GoldenGate Veridata doesn't support the following databases for repair functionality, but supported by Oracle GoldenGate:
ü Non Stop (Enscribe, SQL/MP, SQL/MX)
BigData Hive
2. OGG Veridata Server安装前准备
2.1 版本说明
l 最新版本Oracle GoldenGate Veridata (12.2.1.4.0) 9月版本(20201029)
l 12.2.1.4.0为基础版本。
l 12.2.1.4.0各个更新新特性:
(1)9月版本:
ü This is a compatibility release for bug fix only, no new feature was added.
(2)7月版本:
ü Support has been added for MySQL Repair Functionality
ü Oracle GoldenGate Veridata now supports users to repair out-of-sync data in MySQL database.
(3)1月版本:
ü Oracle GoldenGate Veridata 12.2.1.4.200115 release includes the following new and changed features :
ü Added MySQL support for comparison as source or target database. However, there is no support added for repair.
ü Oracle GoldenGate Veridata now fully supports Oracle Multitenant Container database.
ü Added support to EXCLUDE VIEWS when creating compare pair.
ü Added support to filter objects using NOT LIKE when creating compare pair.
2.2 验证安装环境要求
l OGG Veridata Server不需要一定在服务端安装OGG软件,如果安装在有OGG软件的服务器上,则需要安装在不同目录。
2.2.1 验证你的使用环境是否受支持
Oracle Fusion Middleware Supported System Configurations
地址:
https://www.oracle.com/middleware/technologies/fusion-certification.html
2.2.2 验证安装环境是否满足要求
Oracle Fusion Middleware System Requirements and Specifications
地址:
https://www.oracle.com/middleware/technologies/internet-application-server/fusion-requirements-and-specifications.html
2.2.3 验证多产品多版本之间协作性
l 如果为全新安装,不存在Oracle Fushion Middleware Infrastructure与Veridata Server软件不同版本,则可以不进行验证,安装统一版本即可。
Oracle Fusion Middleware Understanding Interoperability and Compatibility
地址:
https://docs.oracle.com/en/middleware/fusion-middleware/12.2.1.4/intop/interoperability-and-compatibility.html#GUID-079825B8-EC21-4DF4-9265-3EEEF5859FE7
2.3 Oracle Fusion Middleware操作系统配置要求
本章节主要描述Oracle Fushion Middleware Infrastructure安装,安装OGG Veridata Server需要先在操作系统安装Oracle Fushion Middleware Infrastructure,然后才可以将OGG Veridata Server安装在Oracle Fushion Middleware Infrastructure相同Oracle_Home。
2.3.1 umask
l UNIX操作系统,Oracle建议umask设置为027。
l 需要与安装程序同一终端运行上述命令。
$ umask 027
2.3.2 不能使用root安装
UNIX操作系统,不能使用root安装程序。
2.3.3 管理软件安装用户要求
当管理软件时,例如打补丁,需要使用与安装相同用户。
2.3.4 Windows操作系统要求
Windows,执行安装,需要具有Administrator权限。
2.3.5 JDK安装版本要求
下面链接查看需要安装的版本jdk:
https://www.oracle.com/middleware/technologies/fusion-certification.html
ORACLE建议jdk目录安装在:/home/oracle/products/jdk
For 12c (12.2.1.4.0), the certified JDK is 1.8.0_221 and later
JDK下载:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2.3.6 ORACLE_HOME目录要求
完成操作系统JDK安装之后,使用Oracle Fusion Middleware 12.2.1.4.0 Infrastructure installer安装Oracle WebLogic Server 12.2.1.4.0
以及Oracle Java Required Files (JRF) Infrastructure services
Oracle home需要考虑如下:
a) 路径不能包含空格。
b) 在每个Oracle home目录只能安装一个Oracle Fusion Middleware product实例。
c) 如果要在一台机器维护多版本,不同版本需要具有不同Oracle home目录。
2.4 Oracle Fusion Middleware资料档案库数据库要求
2.4.1 服务器端组件资料档案库数据库需求
l 可以参考下面文档,查看更详细相关信息:
https://www.oracle.com/middleware/technologies/internet-application-server/fusion-requirements-and-specifications.html
l Oracle GoldenGate Veridata服务端需要一个数据库作为资料档案库,用来存储使用Oracle GoldenGate Veridata网页端时创建的对象的信息以及环境首选项配置等。
l Use the Repository Creation Utility (RCU) to create the repository. See Creating the Oracle GoldenGate Veridata Repository Schema.
2.4.2 资料档案库支持数据库类型
l Oracle
l SQL Server
2.4.3 OGG Veridata Server资料档案库需要的数据库权限
l Oracle
a) Create a user and password.
b) Specify QUOTA UNLIMITED on the user's default tablespace.
l SQL Server
a) Create a database and login that is a user of the database where you will be installing the repository.
b) Grant this login sufficient privileges to perform the following operations:
c) CONNECT to the database
d) CREATE, ALTER, DROP TABLE in the database
e) CREATE and DROP INDEX in the database
f) INSERT, UPDATE, DELETE from tables in the database
h) SELECT from tables in the database
i) ALTER SCHEMA of the login's default schema
2.4.4 Oracle GoldenGate Veridata Server需要的环境变量配置相关
l Oracle
a) The database instance name
b) The ORACLE_HOME (if using TNSNAMES connection method)
c) Default and temporary tablespaces for the repository (if you will be creating a new user for the server component during installation)
d) A login and password, if using an existing database user for the repository.
l SQL Server
a) The SQL Server instance must be configured to use a static port number.
b) This port is stored in a configuration file so that it can be referenced to make JDBC connections to the database.
c) A login and password (or integrated authentication), if using an existing database user for the repository.
2.5 Oracle GoldenGate Veridata网页端安装要求
这个章节主要描述OGG Veridata Server端安装,安装OGG Veridata Server,需要先安装ADR(Application Development Runtime)环境Oracle Fushion Middleware Infrastructure。
2.5.1 安装程序
One installer program installs both Oracle GoldenGate Veridata Web Server component and Oracle GoldenGate Veridata Web User Interface.
2.5.2 JAVA环境要求
JDK 1.8.0_221 or higher is required for the Veridata Web User Interface installation.
2.5.3 浏览器版本要求
l Microsoft Internet Explorer version 11 or higher
l Mozilla Firefox version 38 or higher
l Google Chrome version 43
2.5.4 屏幕分辨率
Minimum of 1024 x 768
2.5.5 端口
l The Oracle GoldenGate Veridata Web application interacts with Oracle WebLogic Server.
l Oracle WebLogic Server is installed with Oracle GoldenGate Veridata Server on default ports. You can change the port numbers if needed.
l Oracle GoldenGate Veridata Web makes use of the default port 8830.
2.6 OGG Veridata Agent System Requirements
2.6.1 Java Agent与C-agent
l Java agent除了NonStop平台都可以使用,NonStop platform只能使用C-agent
l Java agent使用UTF-8字符集比较字符数据。Out-of-sync数据使用UTF-8字符集写入报告文件。
l OGG Veridata Oracle C-Agent可以用于比较源端与目标端相同字符集以及相同字节序的平台。
l C-Agent不能与Java-agent进行比较,比较报告中非有效utf-8字符将以16进制显示。
l 一个agent不能检索不同数据库实例数据行。
l Java agent使用JDBC连接数据库, 可以安装在数据库所在服务器或者不同服务器,但是安装在不同数据库要考虑不在数据库服务器带来的网络带宽消耗以及处理资源消耗。
注:Java agent可以不安装在要比对的数据库端,可以远程连接,也可以安装在OGG Veridata Server端,然后一次安装启动多个agent,连接不同数据库。
2.6.2 Java-agent支持数据库
Oracle GoldenGate Veridata provides a Java-based agent for the following databases:
l DB2 for i, DB2 LUW, and DB2 z/OS
l Oracle
l SQL Server
l Sybase ASE
l Teradata
l Informix
l BigData Hive
2.6.3 C-Agent支持与说明
l C-agent对于NonStop SQL/MP以及Enscribe数据库是必须的,可以安装在守护环境。
l C-agent支持Oracle database,但是从11.2.1.0.0版本开始,不再被加强。
l C-agent必须安装在数据库所在服务器。
l 对于Oracle,C-agent动态函式库要可用,在不同平台需要设置如下环境变量:
Variable Operating System
PATH=Oracle_libraries Windows
SHLIB_PATH=Oracle_libraries HP-UX
LIBPATH=Oracle_libraries IBM AIX
LD_LIBRARY_PATH=Oracle_libraries All other supported UNIX platforms
2.6.4 Agent组件磁盘以及内存要求
l agent需要至少1GB内存
l agent对于磁盘需求根据不同平台需要不同,大约200M。
2.6.5 Agent组件需要的数据库权限
Agent组件需要的权限并不需要预先配置,只需要在访问OGG Veridata Server网页端时,配置连接串,连接数据库用户时,该用户需要具有相应权限,才能正常比对与repair修复数据。
l Required database privileges for Oracle GoldenGate Veridata Agent
ü DB2
SELECT privileges on the tables that will be compared.
ü Oracle
GRANT CONNECT
GRANT SELECT on the tables to be compared. It is recommended, but not necessary, to GRANT SELECT ANY TABLE.
SELECT_CATALOG_ROLE
ü NonStop SQL/MP and Enscribe
Read access to the SQL/MP system catalog (for queries to CATALOGS table).
Read access to the SQL/MP catalogs that you want Oracle GoldenGate Veridata to use.
Read access to the DDL dictionaries that you want Oracle GoldenGate Veridata to use.
Read access to the Enscribe and SQL/MP tables that will be compared.
Read, write, create, purge permissions for the Oracle GoldenGate Veridata report and trace files, and access to the sub volumes where they are installed.
ü SQL Server
db_datareader or the equivalent on the tables to be compared.
VIEW DEFINITION in the databases to be compared.
The database must allow SQL Server authentication.
ü Sybase ASE
Access to the databases to be compared.
SELECT privileges on the tables to be compared.
SELECT privileges on the sysdatabases system table in the master database to view the list of databases available in the server.
ü Teradata
SELECT privileges on the tables to be compared.
ü Informix
SELECT privileges on the tables to be compared.
ü BigData Hive
SELECT privileges on the tables to be compared.
l Required Database Privileges for Using the Repair Feature
ü For all databases, the database user must have the UPDATE, INSERT, and DELETE privileges on the tables to be repaired.
ü For Sybase database, if the table has triggers and suppression of triggers enabled, the database user must have the replication_role privilege.
ü For SQL Server database, If the table being repaired has 'identity columns',
the Repair User specified must be either the table owner, or should have ALTER permission on the table that is being repaired.
3. 安装配置
3.1 检查系统版本
# uname -a
# java -version
# java 不符合下载jdk,安装。
# rpm -ivh jdk-8u261-linux-x64.rpm
# su - oracle
$ vi .bash_profile
export JAVA_HOME=/usr/java/jdk1.8.0_261-amd64
export PATH=$PATH:/usr/java/jdk1.8.0_261-amd64/bin
# 创建Oracle_Home,如果不创建默认安装/home/oracle/Oracle/Middleware/Oracle_Home
# mkdir -p /u01/app/Oracle/Middleware/Oracle_Home
# chown -R oracle:oinstall /u01/app/Oracle
3.2 安装Fusion Middleware Infrastructure
Application Development Runtime
https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html
找到对应版本选项下载,
Fusion Middleware Infrastructure Installer。
$ /usr/java/jdk-15/bin/java -jar fmw_12.2.1.4.0_infrastructure.jar
java版本安装为jdk 261
3.3 OGG Veridata Server安装
$ export DISPLAY=192.168.204.100:0.0
$ /usr/java/jdk-15/bin/java -jar fmw_12.2.1.4.0_ogg.jar
# 选择Oracle Home时需要选则Fushion Middleware Infrastructure安装时的Oracle Home。
Oracle Home 要选择,上一步Oracle Fushion Middleware Infrastructure安装的Oracle Home目录。
3.4 opatch打补丁
3.4.1 查看补丁信息
$ /home/oracle/Oracle/Middleware/Oracle_Home/OPatch/opatch lsinventory -jre $ORACLE_HOME/oracle_common/jdk/jre
3.4.2 升级opatch工具
参考README,如果必要升级opatch
3.4.3 应用补丁
$ echo $ORACLE_HOME
/home/oracle/Oracle/Middleware/Oracle_Home
$ cd oggveridata/31044508/
$ /home/oracle/Oracle/Middleware/Oracle_Home/OPatch/opatch apply
Oracle Interim Patch Installer version 13.9.4.2.1
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /home/oracle/Oracle/Middleware/Oracle_Home
Central Inventory : /oracle/app/oraInventory
from : /home/oracle/Oracle/Middleware/Oracle_Home/oraInst.loc
OPatch version : 13.9.4.2.1
OUI version : 13.9.4.0.0
Log file location : /home/oracle/Oracle/Middleware/Oracle_Home/cfgtoollogs/opatch/opatch2020-10-20_23-44-36PM_1.log
OPatch detects the Middleware Home as "/home/oracle/Oracle/Middleware/Oracle_Home"
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 31044508
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/home/oracle/Oracle/Middleware/Oracle_Home')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '31044508' to OH '/home/oracle/Oracle/Middleware/Oracle_Home'
Patching component oracle.rcu.veridata, 12.2.1.4.0...
Patching component oracle.veridata.agent.core, 12.2.1.4.0...
Patching component oracle.veridata.agent.core, 12.2.1.4.0...
Patching component oracle.veridata.web.core, 12.2.1.4.0...
Patching component oracle.veridata.web.core, 12.2.1.4.0...
Patching component oracle.fmw.upgrade.veridata, 12.2.1.4.0...
Patch 31044508 successfully applied.
Log file location: /home/oracle/Oracle/Middleware/Oracle_Home/cfgtoollogs/opatch/opatch2020-10-20_23-44-36PM_1.log
OPatch succeeded.
3.5 使用RCU工具创建资料档案库
3.5.1 创建数据库用户
SYS@messay > create user oggveridata identified by oggveridata;
SYS@messay > grant unlimited tablespace to oggveridata;
3.5.2 启动RCU
进入$ORACLE_HOME/oracle_common/bin启动RCU.
l Set the JAVA_HOME environment variable to your JDK location.
l On UNIX operating systems:
setenv JAVA_HOME=/home/Oracle/Java/jdkversion
l On Windows operating systems,
右键计算机-属性-高级计算机设置配置环境变量
l 进入ORACLE_HOME/oracle_common/bin目录
Repository Creation Utility RCU.
a) On UNIX operating systems:
$ export DISPLAY=192.168.204.100:0.0
$ ./rcu
3.5.3 DBA权限用户说明
l 如果运行RCU时,拥有的数据库用户没有DBA权限,则需要在选择功能时,只选择Perform Product Load,最后完成界面找到脚本目录,交由DBA权限用户执行下面脚本,创建相应表空间,完成system load:
SYS@messay > @script_systemLoad.sql
# 根据上面脚本提示,需要为每个schema设置密码,记住密码,下一步再次运行rcu还需要使用。
l 如果具有DBA权限,则选择,systemload and product load。
Unix:
$ export DISPLAY=192.168.204.100:0.0
$ ./rcu
# 选择
On Windows operating systems:
rcu.bat
3.5.4 具有DBA权限
3.5.5 没有DBA权限
RCU创建Repository
如果安装没有DBA权限,则需要选择第二个,生成SQL脚本,由具有DBA权限的用户执行,这里选择第二个,需要手工使用DBA用户执行system_load脚本之后再次运行RCU。
进入上面Script Location目录,执行script_systemLoad.sql脚本
再次运行RCU
密码:Oracle123
3.6 创建Weblogic Domain
OGG Veridata Server通过Weblogic域进行管理,所以在可以访问OGG Veridata Server Web Interface之前,需要创建Weblogic Domain。
3.6.1 运行配置向导config.sh
进入ORACLE_HOME/oracle_common/common/bin目录:
On UNIX operating systems:
$ cd /home/oracle/Oracle/Middleware/Oracle_Home/oracle_common/common/bin
$ ./config.sh
On Windows operating systems:
config.cmd
3.6.2 按照向导执行下面步骤
l Task 1, "Selecting the Domain Type and Domain Home Location"
l Task 2, "Selecting the Configuration Templates"
l Task 3, "Configuring the Administrator Account"
l Task 4, "Specifying the Domain Mode and JDK"
l Task 5, "Specifying the Datasource Configuration Type"
l Task 6, "Specifying JDBC Component Schema Information"
l Task 7, "Testing the JDBC Connections"
l Task 8, "Specifying Keystore Details"
l Task 9, "Selecting Advanced Configuration"
l Task 10, "Configuring the Administration Server Listen Address"
l Task 12, "Configuring Managed Servers"
l Task 13, "Reviewing Your Configuration Specifications and Configuring the Domain"
l Task 14, "Reviewing Your Domain Home and Administration Server URL"
ORACLE_HOME/oracle_common/common/bin/config.sh创建domain
选择Veridata Standard Weblogic Server Domain,会自动选中下面两个。
输入管理员帐户密码,密码输入Oracle123
输入相关连接信息,电子Get RCU Configuration查看是否成功。
如果上面信息正确,则下面会自动检索正确,如果不正确,选中行,修改信息即可。
3.7 启动Administration Server
3.7.1 前台启动
cd DOMAIN_HOME/bin目录:
On UNIX operating systems, run:
./startWebLogic.sh
# config.sh 时创建的管理员账号。
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:Oracle123
# 绝对路径
$ cd /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin
$ /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin/startWebLogic.sh
3.7.2 后台启动
l 将管理员账号密码写入文件
l 明文写入文件之后,启动一次之后,Oracle会将密码用户使用AES256加密。
$ cd /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/servers/AdminServer
$ mkdir security
$ cd security
$ vi boot.properties
username=weblogic
password=Oracle123
# 启动命令
$ nohup /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin/startWebLogic.sh >nohup.out 2>&1 &
On Windows operating systems, run:
startWebLogic.cmd
3.7.3 Administration访问地址
访问地址:
http://192.168.204.231:7001/console
# 可以通过上面地址管理Veridata Server登陆帐户密码,权限等等,管理域等。
3.7.4 停止weblogic
$ /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin/stopWeblogic.sh
3.8 启动Veridata Server
3.8.1 前台启动
$ /home/oracle/Oracle/Middleware/Oracle_Home/veridata/bin
$ ./veridataServer.sh start VERIDATA_server1 t3://192.168.204.231:7001
注:启动 VERIDATA_server1 为在 weblogic 管理服务器中创建的域 server 名称,默认即为 VERIDATA_server1 , t3://192.168.204.231:7001 默认即为该地址,所以启动如果未自定义端口地址, server 名称,可以不指定。
3.8.2 后台启动
$ cd /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/servers/VERIDATA_server1
$ mkdir security
$ cd security
$ vi boot.properties
username=weblogic
password=Oracle123
# 后台启动
$ nohup /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/veridata/bin/veridataServer.sh start VERIDATA_server1 t3://192.168.204.231:7001 &
3.8.3 OGG Veridata Server访问地址
http://192.168.204.231:8830/veridat a
# 登陆用户可以使用weblogic管理员,也可以在http://192.168.204.231:7001/console管理页面-安全领域-用户与组创建veridata权限用户。
3.8.4 停止OGG Veridata Server
$ /home/oracle/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/veridata/bin/veridataServer.sh stop
4. Agent安装部署
OGG Veridata目录结构:
Directory Variable Directory Path
ORACLE_HOME /install_location/Oracle_Home.
This is the home directory for the Oracle Fusion Middleware products.
VERIDATA_PRODUCT_HOME /ORACLE_HOME/veridata
AGENT_ORACLE_HOME /VERIDATA_PRODUCT_HOME/agent
AGENT_DEPLOY_LOCATION This is the location where the Oracle GoldenGate Veridata Agent is deployed.
# Note that this location should be outside the ORACLE_HOME.
4.1 异机安装
l 如果agent部署在OGG Veridata Server,则跳过此安装步骤。
4.1.1 Oracle Fushion Middleware Infrastructure安装
$ java -jar fmw_12.2.1.4.0_infrastructure.jar
安装配置图形,参考3.2章节 3.2 安装Fusion Middleware Infrastructure
4.1.2 agent安装
$ java -jar fmw_12.2.1.4.0_ogg.jar
4.1.3 补丁安装
$ unzip p31044508_122140_Generic_20200717_OGG_veridata_bundlepatch.zip
$ export ORACLE_HOME=/veridata/Oracle/Middleware/Oracle_Home
# 校验补丁版本,opatch版本
$ /veridata/Oracle/Middleware/Oracle_Home/OPatch/opatch lsinventory -jre $ORACLE_HOME/oracle_common/jdk/jre
$ /veridata/Oracle/Middleware/Oracle_Home/OPatch/opatch apply
4.2 agent配置
安装agent软件之后,需要使用下面命令生成agent location相关目录以及启动脚本、配置样例文件等:
agent_config.sh|.bat AGENT_DEPLOY_LOCATION
4.2.1 agent_config.sh
$ cd /veridata/Oracle/Middleware/Oracle_Home/veridata/agent
$ ./agent_config.sh /veridata/Oracle/Middleware/agent_location
Successfully deployed the agent.
# /veridata/Oracle/Middleware/agent_location 必须在 /veridata/Oracle/Middleware/Oracle_Home 之外。
4.2.2 agent.properties配置文件
# cd进入agent部署目录AGENT_DEPLOY_LOCATION.
$ cd /veridata/Oracle/Middleware/agent_location
$ cp agent.properties.sample agent.properties
$ vi agent.properties
server.port=7862
database.url=jdbc:oracle:thin:@192.168.204.181:1521:honor
# 这种写法是指定实例 sid 写法,如果要指定 service_name 需要另外写法
server.jdbcDriver=ojdbc8.jar oracle.xdb.jar
4.2.3 拷贝drivers驱动到drivers目录
# 将drivers文件拷贝到AGENT_DEPLOY_LOCATION/drivers目录。
$ cd /veridata/Oracle/Middleware/agent_location/drivers
$ cp /veridata/Oracle/Middleware/Oracle_Home/veridata/agent/drivers/ojdbc8.jar .
4.2.4 启动/停止OGG Veridata Agent
cd进入agent部署目录AGENT_DEPLOY_LOCATION.
$ ./agent.sh start agent.properties
# agent.properties文件为上面包含连接数据库信息的配置文件。
# 停止agent
$ ./agent.sh stop
5. OGG Veridata使用
5.1 添加agent受管机器
访问: http://192.168.204.231:8830/veridata
使用 http://192.168.204.231:7001/console地址添加的用户登陆veridata。
5.2 比对
进行比对大致步骤为(以下步骤在OGG Veridata Server Web Interface中均有功能模块对应):
ü 配置连接配置。
ü 配置对比组。
ü 对比组中创建对比表对,如果组未创建表对,则后续job也无法在组中检索到比对表对,所以需要为组创建比对表对。
ü 创建比对job,可以单独创建job或者使用上一步创建的比对组,如果创建job未关联比对组,则运行job是依然需要再次选择group,然后检索group中比对表对,进行对比。
ü 运行job,选择要比对的表对进行run。
ü 在finished里可以看到比对结果,以及可以运行repair,进行repair需要连接配置数据库用户具有相应权限。
5.3 group配置
ü 注意Source与Target选择,如果使用Veridata进行repair,则需要严格选择,因为会以Source作为基准进行数据修复,Target多余的数据会delete,不同的数据会update,不存在的会insert。
ü 在组配置中点击上图Go to Compare Pair Configuration配置比对对,即Source与Target表对应对。