WEB开发网
开发学院数据库Oracle Oracle 10g使用RMAN创建physical standby(二) 阅读

Oracle 10g使用RMAN创建physical standby(二)

 2008-11-11 12:59:44 来源:WEB开发网   
核心提示: RMAN-05507: standby controlfile checkpoint (710256) is more recent than duplicat ion point in time (709530) 至此,备库创建成功,Oracle 10g使用RMAN创建physical

RMAN-05507: standby controlfile checkpoint (710256) is more recent than duplicat

ion point in time (709530)

至此,备库创建成功。

11.将备库置于自动恢复状态

SQL> conn / as sysdba
Connected.
SQL>alter database recover managed standby database disconnect from session;
Media recovery complete.

12.switchover

物理STANDBY的SWITCHOVER切换会把当前的一个物理STANDBY切换为PRIMARY数据库,而PRIMARY数据库且变成物理STNADBY数据库。

一般SWITCHOVER切换都是计划中的切换,特点是在切换后,不会丢失任何的数据,而且这个过程是可逆的,整个DATA GUARD环境不会被破坏,原来DATA GUARD环境中的所有物理和逻辑STANDBY都可以继续工作。

在进行DATA GUARD的物理STANDBY切换前需要注意:

确认主库和从库间网络连接通畅;

确认没有活动的会话连接在数据库中;

PRIMARY数据库处于打开的状态,STANDBY数据库处于MOUNT状态;

确保STANDBY数据库处于ARCHIVELOG模式;

如果设置了REDO应用的延迟,那么将这个设置去掉;

确保配置了主库和从库的初始化参数,使得切换完成后,DATA GUARD机制可以顺利的运行。

主库:

  [oracle@s1 ~]$ sqlplus "/ as sysdba"
  SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 29 19:55:02 2008
  Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
  SQL> alter database commit to switchover to physical standby;
  Database altered.
  SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
  Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
SQL> alter database mount standby database;
  Database altered.
  SQL> alter database recover managed standby database disconnect from session;
  Database altered.

备库:

  SQL> alter database commit to switchover to primary;
  Database altered.
  SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
  Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL>

至此完成自由切换。

上一页  1 2 3 

Tags:Oracle 使用 RMAN

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接