源端部署:
sqlplus sys as syadba :以sys登录Oracle–最高权限
启用日志存档模式:
shutdown immediate;
startup mount;
alter database archivelog;
archive log list;
alter database open;
启用强制记录模式:
alter database force logging;
select force_logging from v$database;
启用 SUPPLEME:
alter database add supplemental log data;
select supplemental_log_data_min from v$database;
关闭源端数据库回收站:
alter system set recyclebin=off;
show parameter recyclebin;
切换日志
alter system switch logfile;
select supplemental_log_data_min from v$database;
创建用户,授权DBA权限
create user admin(用户名) identified by admin(密码);
grant dba to admin;
开始配置源端:
注:配置环境VMware,win7
cmd命令行进入ogg文件夹:
ggsci
create subdirs
edit param mgr #点击是,编辑mgr.prm
mgr.prm #ogg/dirprm
PORT 7809
DYNAMICPORTLIST 7840-7850
dblogin userid admin password admin
add trandata admin.*
add extract extl,tranlog,begin now
edit param extl #点击是,编辑extl.prm
extl.prm #ogg/dirprm
extract ext1
userid admin,password oracle
rmthost 127.0.0.1, mgrport 7909 #目的端IP,端口
rmttrail E:\ogg_1\dirdat\r1 #目的端路径
dynamicresolution
gettruncates
table admin.*;
开始配置目的端:
注:配置环境VMware,win7
cmd命令行进入ogg文件夹:
ggsci
create subdirs
edit param mgr #点击是,编辑mgr.prm
mgr.prm #ogg_1/dirprm
PORT 7909
DYNAMICPORTLIST 7940-7950
dblogin userid root password root
add replicat repl exttrail E:\ogg_1\dirdat\r1, nodbcheckpoint
edit param repl #点击是,编辑repl.prm
repl.prm #ogg_1/dirprm
replicat repl
userid root,password root
assumetargetdefs
reperror default,discard
discardfile E:\ogg_1\dirdat\repsz.dsc,append,megabytes 100
map admin., target root.;
注:启动OGG:start/stop 进程名称