Oracle 11.2.0.4 physical dataguard和snapshot dataguard切换
发表于:2025-01-19 作者:千家信息网编辑
千家信息网最后更新 2025年01月19日,平台:suse 11sp4Oracle11.2.0.4适用于数据迁移,灾备演练,详细过程如下:------convert physical standby to snapshot database1、
千家信息网最后更新 2025年01月19日Oracle 11.2.0.4 physical dataguard和snapshot dataguard切换平台:
suse 11sp4
Oracle11.2.0.4
适用于数据迁移,灾备演练,详细过程如下:
------convert physical standby to snapshot database
1、Stop Redo Apply, if it is active.
2、Ensure that the database is mounted, but not open.
3、Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.
4、Issue the following SQL statement to perform the conversion:
SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
select process,status,group#,thread#,sequence#,blocks from v$managed_standby;
select FLASHBACK_ON from v$database;
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database recover managed standby database cancel;
Database altered.
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> select process,status,group#,thread#,sequence#,blocks,BLOCK#,DELAY_MINS,ACTIVE_AGENTS from v$managed_standby;
sys@ORA11G> alter system set db_recovery_file_dest_size=200m;
System altered.
sys@ORA11G> ho mkdir /oracle/11.2.0.4/oradata/oradg/flash
sys@ORA11G> alter system set db_recovery_file_dest='/oracle/11.2.0.4/oradata/oradg/flash';
System altered.
sys@ORA11G> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Database altered.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG RESTORE POINT ONLY MOUNTED SNAPSHOT STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database open;
Database altered.
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 95.24 0 2
FOREIGN ARCHIVED LOG 0 0 0
sys@ORA11G> select name,space_limit,space_used,number_of_files from v$recovery_file_dest
2 ;
NAME SPACE_LIMIT SPACE_USED NUMBER_OF_FILES
-------------------------------------------------- ----------- ---------- ---------------
/oracle/11.2.0.4/oradata/oradg/flash 110100480 104857600 2
---conver to physical
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
sys@ORA11G> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
sys@ORA11G> startup
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY PHYSICAL STANDBY
RECOVERY NEEDED oradg
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
sys@ORA11G> recover MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Media recovery complete.
sys@ORA11G>
sys@ORA11G>
sys@ORA11G>
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY
NOT ALLOWED oradg
suse 11sp4
Oracle11.2.0.4
适用于数据迁移,灾备演练,详细过程如下:
------convert physical standby to snapshot database
1、Stop Redo Apply, if it is active.
2、Ensure that the database is mounted, but not open.
3、Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.
4、Issue the following SQL statement to perform the conversion:
SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
select process,status,group#,thread#,sequence#,blocks from v$managed_standby;
select FLASHBACK_ON from v$database;
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database recover managed standby database cancel;
Database altered.
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> select process,status,group#,thread#,sequence#,blocks,BLOCK#,DELAY_MINS,ACTIVE_AGENTS from v$managed_standby;
sys@ORA11G> alter system set db_recovery_file_dest_size=200m;
System altered.
sys@ORA11G> ho mkdir /oracle/11.2.0.4/oradata/oradg/flash
sys@ORA11G> alter system set db_recovery_file_dest='/oracle/11.2.0.4/oradata/oradg/flash';
System altered.
sys@ORA11G> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Database altered.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
--------- ------------ ------------------ -------------------- ---------------- -------------------- ------------------------------
ORA11G ARCHIVELOG RESTORE POINT ONLY MOUNTED SNAPSHOT STANDBY NOT ALLOWED oradg
sys@ORA11G> alter database open;
Database altered.
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 95.24 0 2
FOREIGN ARCHIVED LOG 0 0 0
sys@ORA11G> select name,space_limit,space_used,number_of_files from v$recovery_file_dest
2 ;
NAME SPACE_LIMIT SPACE_USED NUMBER_OF_FILES
-------------------------------------------------- ----------- ---------- ---------------
/oracle/11.2.0.4/oradata/oradg/flash 110100480 104857600 2
---conver to physical
sys@ORA11G> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORA11G> startup mount;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
sys@ORA11G> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
sys@ORA11G> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
sys@ORA11G> startup
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY PHYSICAL STANDBY
RECOVERY NEEDED oradg
sys@ORA11G> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
sys@ORA11G> recover MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Media recovery complete.
sys@ORA11G>
sys@ORA11G>
sys@ORA11G>
sys@ORA11G> select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database;
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
-------------------------------------------------- ------------ ------------------ -------------------- ----------------
SWITCHOVER_STATUS DB_UNIQUE_NAME
-------------------- ------------------------------
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY
NOT ALLOWED oradg
平台
数据
过程
演练
切换
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
rman 迁移数据库
数据库软件开发是什么
浦北县张黄镇家政服务器
内测服务器 龙啸苍穹 龙门飞甲
苏州代驾软件开发
无线网络安全协同
编程 服务器
贵州信创国产化服务器
暗黑破坏神2 重制版服务器
数据库Ssex是什么
雅海软件开发
浪潮服务器滑轨尺寸
服务器开机启动项是什么意思
高校社团数据库设计前沿
数据库数据被黑要怎么恢复数据
简易数据库软件
告学生网络安全通知
苹果控制中心没有数据库
东营仓库库存软件开发
iphone数据库迁移
深圳软件开发大学有哪些
杭州圣优网络技术有限公司
信息科技互联网
服务器游戏更新后
incites数据库简介
贵阳租房网络安全
数据库集群的expdp目录
min在数据库的使用方法
什么是web服务器简述
中国人才数据库国家承认吗