『ORACLE』DG之Snapshot Standby功能(11g)
来源:互联网 发布:骑马与砍杀捏脸数据女 编辑:程序博客网 时间:2024/06/05 02:16
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database convert to snapshot standby;
alter database convert to snapshot standby
*
ERROR at line 1:
ORA-38784: Cannot create restore point 'SNAPSHOT_STANDBY_REQUIRED_05/04/2017
03:31:26'.
ORA-38786: Recovery area is not enabled.
SQL> show parameter recover
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
db_unrecoverable_scn_tracking boolean TRUE
recovery_parallelism integer 0
SQL> alter system set db_recovery_file_dest_size=1G;
System altered.
SQL> alter system set db_recovery_file_dest='/u01/app/oracle/recovery';
System altered.
SQL> alter database convert to snapshot standby;
Database altered.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
SNAPSHOT STANDBY MOUNTED
SQL> alter database open;
Database altered.
SQL> show parameter user
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
license_max_users integer 0
parallel_adaptive_multi_user boolean TRUE
redo_transport_user string
user_dump_dest string /u01/app/oracle/diag/rdbms/enmo2/enmo2/trace
此时查看alert日志,会发现数据见了一个guaranteed restore point,确保我们切回主备,可应用日志。
[oracle@enmo2 ~]$ cd /u01/app/oracle/diag/rdbms/enmo2/enmo2/trace
[oracle@enmo2 trace]$ tail -100f alert_enmo2.log
alter database convert to snapshot standby
Starting background process RVWR
Thu May 04 04:09:35 2017
RVWR started with pid=32, OS id=24686
Allocated 3981120 bytes in shared pool for flashback generation buffer
Created guaranteed restore point SNAPSHOT_STANDBY_REQUIRED_05/04/2017 04:09:35
All dispatchers and shared servers shutdown
CLOSE: killing server sessions.
CLOSE: all sessions shutdown successfully.
Thu May 04 04:09:37 2017
SMON: disabling cache recovery
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
RESETLOGS after incomplete recovery UNTIL CHANGE 1051425
Online log /u01/app/oracle/oradata/enmo2/redo01.log: Thread 1 Group 1 was previously cleared
Online log /u01/app/oracle/oradata/enmo2/redo02.log: Thread 1 Group 2 was previously cleared
Online log /u01/app/oracle/oradata/enmo2/redo03.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 1051423
[oracle@enmo2 trace]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu May 4 05:26:49 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 692063352 bytes
Database Buffers 130023424 bytes
Redo Buffers 6586368 bytes
Database mounted.
SQL> alter database convert to physical standby;
Database altered.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 692063352 bytes
Database Buffers 130023424 bytes
Redo Buffers 6586368 bytes
Database mounted.
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
- 『ORACLE』DG之Snapshot Standby功能(11g)
- Oracle 11g Snapshot Standby数据库功能
- Oracle 11g物理Data Guard之Snapshot Standby数据库功能
- Oracle Study之案例--Oracle 11g DataGuard Snapshot Standby
- Oracle 11g物理Data Guard之Snapshot Standby
- oracle 11g Snapshot Standby数据库
- ORACLE 11G SNAPSHOT STANDBY实例
- 实验DG Snapshot Standby
- 『ORACLE』 DG性能转换(11g)
- 『ORACLE』 DG切换主备库角色(11g)
- Oracle DG之--构建Physical Standby(一主库对应多备库)
- Oracle DG之--构建Physical Standby
- Oracle DG 之故障--standby dg 通讯错误
- oracle 11g RMAN:Active Database Duplication for standby database 创建dg 命令解读
- oracle 11g RMAN:Active Database Duplication for standby database 创建dg 命令解读
- 『ORACLE』DG搭建时备库的db_name报错(11g)
- oracle 11g DG 搭建
- 【ORACLE】11g rac+dg
- PHPCMS V9模板中的常用变量、碎片代码详解
- JVM8(4)java虚拟机内部结构
- Java中的abstract关键字理解
- Android 仿ios的tip提示语样式SVProgressHUD
- spring AOP解说
- 『ORACLE』DG之Snapshot Standby功能(11g)
- ftp配置虚拟用户
- Java反射原理
- BZOJ 1497: [NOI2006]最大获利 最大权闭合子图
- 自定义控件怎么setId
- dfs.hosts配置
- Python 中的join()与split()
- TensorFlow DNN 实现MNIST数字识别(初版)
- ios-runtime(swift)使用,修改pageControl的小圆点