备份与恢复

DataGuard物理备用切换到逻辑备用

时间:2014-9-22 18:19:32  作者:www.solgle.com  来源:solgle.com  查看:453  评论:0
内容摘要:DataGuard物理备用切换到逻辑备用伀爀愀挀氀攀 verion 11.2.0.4Linux verion 漀爀愀挀氀攀 enterprice 6.5(64bit)设定主库模式(可选)SQL> alter database set standby to maximize...

DataGuard物理备用切换到逻辑备用 
 

Oracle verion  11.2.0.4

Linux verion  oracle enterprice 6.5(64bit)

本文出自:http://www.solgle.com/news/?143.html
 

设定主库模式(可选)

SQL> alter database set standby to maximize availability;

数据库已更改。

 

一:切换到逻辑备用数据库

 

1:连接上备份库执行;

SQL> alter database recover managed standby database cancel;

Database altered.

SQL>

 

2:主库执行;

SQL> exec dbms_logstdby.build;

PL/SQL 过程已成功完成。

SQL>

 

3:备份库执行

SQL> alter database close;

alter database close

*

ERROR at line 1:

ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

(关闭所有会话后)

 

SQL> alter database close;

Database altered.

 

SQL> alter database recover to logical standby solgle2;

Database altered.

 

SQL> alter database start logical standby apply immediate;

alter database start logical standby apply immediate

*

ERROR at line 1:

ORA-01507: database not mounted

 

 

SQL> startup mount force

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2252824 bytes

Variable Size             788533224 bytes

Database Buffers          452984832 bytes

Redo Buffers                8892416 bytes

Database mounted.

 

SQL> alter database start logical standby apply immediate;

alter database start logical standby apply immediate

*

ERROR at line 1:

ORA-01109: database not open

 

 

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

 

 

SQL> alter database open resetlogs;

Database altered.

 

SQL> alter database start logical standby apply immediate;

Database altered.

SQL>

 

二:查看其它一些状态

 

1:备份库查看状态;

SQL> select open_mode,protection_level,database_role from v$database;

OPEN_MODE            PROTECTION_LEVEL     DATABASE_ROLE

-------------------- -------------------- ----------------

READ WRITE           MAXIMUM AVAILABILITY LOGICAL STANDBY

SQL>

 

2:查看不支持对象(略)

 

三:打开备份数据库修改功能

 

SQL> alter database guard standby;   (注:优先执行)

Database altered.

SQL>

 

逻辑备份库数据保护模式: alter database guard standby/none/all;

standby:不能修改sql apply正在复制的表

none:可以自由的修改具有权限的表

all:禁止修改所有表

 

四:重启逻辑备份库的服务

 

SQL> alter database stop logical standby apply;

Database altered.

 

SQL> alter database start logical standby apply immediate;

Database altered.

SQL>

 

标签:DataGuard逻辑备用 dataguard 

solgle.com 版权所有,欢迎分享!!!

相关评论
   Copyright © 2013-2020 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1