目录
1. 搭建环境规划 ..........................................................................................................................3
2.DG 部署 .........................................................................................................................................3
2.1.建立主库 ............................................................................................................................3
2.2.主库开启归档 ....................................................................................................................5
2.4.从主库创建 pfile 文件 .......................................................................................................6
2.5.设置主库初始化参数 ........................................................................................................6
2.6.设置备库初始化参数 ........................................................................................................6
2.7.复制主库的密码文件到备库 ............................................................................................7
2.8.创建备库相应的目录结构 ................................................................................................7
2.9.配置主库和备库的监听 ....................................................................................................7
2.10.配置主库和备库的网络服务名.......................................................................................8
2.11.创建备库并启动 ..............................................................................................................9
2.12.RMAN 复制主库到备库...................................................................................................9
2.13.在备库开启实时日志应用 ............................................................................................10
2.14.主备库角色状态查询 ....................................................................................................10
3.测试 DG .......................................................................................................................................10
3.1.执行日志切换测试 ..........................................................................................................10
3.2.查看备库启动的 DG 进程 ...............................................................................................10
3.3.查看数据库的保护模式(主库)...................................................................................11
3.6.添加数据验证同步 ..........................................................................................................11
4.DG 角色切换 ...............................................................................................................................12
4.1.DG switchover 切换测试.................................................................................................12
4.2.DG failover 切换测试 ......................................................................................................13
5.开启和关闭 DataGuard 的流程..................................................................................................14
5.1.关闭 ..................................................................................................................................14
5.2.开启 ..................................................................................................................................15
6.Daguard 环境主从数据同步检查基本命令...............................................................................15
6.1 上查看主备库的 SCN 号..................................................................................................15
6.2 查看归档日志位置状态 ..................................................................................................15
6.3 在备库查看有没有 gap 日志...........................................................................................15
6.4 主备库查看日志应用情况 ..............................................................................................16
6.5 手动激活日志切换 ..........................................................................................................16