snapshot standby快照備庫角色
snapshot standby 與physical standby的切換,兩個角色都是針對備庫來說的 :
----切換到snapshot standby快照備庫:
--開啟備庫,檢視備庫狀態:
SQL> alter database open;
Database altered.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY
目前為物理備庫角色。
--切換成快照備庫前開啟閃回功能:
SQL> alter database flashback on;
Database 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> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
SNAPSHOT STANDBY READ WRITE
--模擬業務建表插資料:
SQL> create table suxing.test(id number);
Table created.
SQL> insert into suxing.test values(2);
1 row created.
SQL> commit;
Commit complete.
--切回到物理備庫:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 692063312 bytes
Database Buffers 138412032 bytes
Redo Buffers 2371584 bytes
Database mounted.
SQL>
SQL> startup mount
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database convert to physical standby;
Database altered.
SQL> SP2-0734: unknown command beginning "Database a..." - rest of line ignored.
--嘗試直接開啟資料庫:
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 692063312 bytes
Database Buffers 138412032 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
SQL>
--從新應用日誌:
SQL> recover managed standby database disconnect from session;
Media recovery complete.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
--檢視剛剛建立的表結構:
SQL> desc suxing.test
ERROR:
ORA-04043: object suxing.test does not exist
----切換到snapshot standby快照備庫:
--開啟備庫,檢視備庫狀態:
SQL> alter database open;
Database altered.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY
目前為物理備庫角色。
--切換成快照備庫前開啟閃回功能:
SQL> alter database flashback on;
Database 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> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
SNAPSHOT STANDBY READ WRITE
--模擬業務建表插資料:
SQL> create table suxing.test(id number);
Table created.
SQL> insert into suxing.test values(2);
1 row created.
SQL> commit;
Commit complete.
--切回到物理備庫:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 692063312 bytes
Database Buffers 138412032 bytes
Redo Buffers 2371584 bytes
Database mounted.
SQL>
SQL> startup mount
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database convert to physical standby;
Database altered.
SQL> SP2-0734: unknown command beginning "Database a..." - rest of line ignored.
--嘗試直接開啟資料庫:
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 692063312 bytes
Database Buffers 138412032 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
SQL>
--從新應用日誌:
SQL> recover managed standby database disconnect from session;
Media recovery complete.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
--檢視剛剛建立的表結構:
SQL> desc suxing.test
ERROR:
ORA-04043: object suxing.test does not exist
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31392094/viewspace-2126908/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- LVM快照Snapshot備份LVM
- 【DATAGUARD】 將11g物理備庫轉換為Snapshot Standby
- 物理備庫互轉快照備庫
- Oracle的快照standbyOracle
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Data Guard之Snapshot Standby資料庫功能[轉]資料庫
- 【DG】之 Snapshot standby模式模式
- Physical Standby Database 切換到 Snapshot Standby DatabaseDatabase
- maven中snapshot快照庫和release釋出庫的區別和作用Maven
- [轉帖]資料庫的快照隔離級別(Snapshot Isolation)資料庫
- 10 管理物理和快照備庫
- Data Guard - Snapshot Standby Database配置Database
- oracle snapshot standby資料庫的scheduler jobs不執行Oracle資料庫
- ORACLE DG之備庫角色Oracle
- 10g Data Guard physical standby的主備庫角色轉換測試(switchover & failover)AI
- Oracle 快照控制檔案(snapshot control file)Oracle
- Oracle快照控制檔案(snapshot control file)Oracle
- DG中主庫與備庫角色的交換
- 【DataGuard】Oracle 11g物理Data Guard之Snapshot Standby資料庫功能Oracle資料庫
- Data Guard新特性:快照備用資料庫資料庫
- 11g Dataguard中的snapshot standby特性
- oracle 11g中的snapshot standby特性Oracle
- 為SQL Server快照snapshot DB建立login訪問SQLServer
- Oracle 18C新特性之PDB snapshot(快照) CarouselOracle
- Dataguard物理Standby Switchover 角色轉換
- 【轉】【DataGuard】Oracle 11g物理Data Guard之Snapshot Standby資料庫功能Oracle資料庫
- Oracle Data Guard主庫備庫角色切換(Switchovers)Oracle
- dataguard standby備庫磁碟空間滿(ZT)
- 聊聊Oracle 11g的Snapshot Standby Database(上)OracleDatabase
- 聊聊Oracle 11g的Snapshot Standby Database(下)OracleDatabase
- [20230425]注意snapshot standby與activate standby的區別.txt
- 【DataGuarad】邏輯遷移與standby備庫
- 通過RMAN Duplicate建立Oracle物理standby備庫Oracle
- 通過Snapshot Standby來精確評估SQL效能SQL
- 物理Standby角色切換作業failoverAI
- 【DATAGUARD】DG系列之RACtoONE快照備用資料庫的搭建資料庫
- 主備角色switch
- Oracle 12.2 physical standby備庫收集AWR報告Oracle