使用例12: フィジカル・スタンバイからスナップショット・スタンバイへの変換

スナップショット・スタンバイ・データベースに変換するフィジカル・スタンバイ・データベースがある場合は、DGMGRLのCONVERT DATABASEコマンドを使用します。

データベースがスナップショット・スタンバイ・データベースとして動作中の間は、REDOデータはデータベースで引き続き受信されますが、スナップショット・スタンバイ・データベースが元のフィジカル・スタンバイ・データベースに変換されるまでREDOデータは適用されません。

フィジカル・スタンバイ・データベースをスナップショット・スタンバイ・データベースに変換するには、フィジカル・スタンバイ・データベースをファスト・リカバリ領域で構成する必要があります。これは、変換プロセス中に作成される保証付きリストア・ポイントにファスト・リカバリ領域が必要であるためです。

DGMGRL> CONVERT DATABASE 'North_Sales' TO SNAPSHOT STANDBY;
2022-12-20T01:24:38.396+00:00
Converting database "North_Sales" to a Snapshot Standby database, please wait...

2022-12-20T01:25:12.244+00:00
Database "North_Sales" converted successfully

2022-12-20T01:25:12.244+00:00
DGMGRL> SHOW CONFIGURATION;

Configuration - DRSolution

  Protection Mode: MaxAvailability
  Members:
  South_Sales - Primary database
    North_Sales - Snapshot standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 33 seconds ago)

データベースを元のフィジカル・スタンバイ・データベースに戻すときは、次に示すように、DGMGRLのCONVERT DATABASEコマンドを再び使用します。スナップショット・スタンバイ・データベースとして動作中にデータベースに加えられた更新はすべて破棄されます。データベースが元のフィジカル・スタンバイ・データベースに変換されると、REDO Applyサービスによって、すべての累積REDOデータが適用されます。

DGMGRL>  CONVERT DATABASE 'North_Sales' TO PHYSICAL STANDBY;
2022-12-20T01:28:35.434+00:00
Converting database "North_Sales" to a Physical Standby database, please wait...

2022-12-20T01:28:35.495+00:00
Operation requires shut down of instance "NorthSales" on database "North_Sales"
Shutting down instance "NorthSales"...
Connected to "North_Sales"
Database closed.
Database dismounted.
ORACLE instance shut down.

2022-12-20T01:28:52.049+00:00
Operation requires start up of instance "NorthSales" on database "North_Sales"
Starting instance "NorthSales"...
Connected to an idle instance.
ORACLE instance started.
Connected to "North_Sales"
Database mounted.

2022-12-20T01:29:06.816+00:00
Continuing to convert database "North_Sales" ...

2022-12-20T01:29:27.289+00:00
Database "North_Sales" converted successfully

2022-12-20T01:29:27.289+00:00
スナップショット・スタンバイ・データベースがフィジカル・スタンバイ・データベースに戻るとすぐに、構成がWARNING状態になります。
DGMGRL> SHOW CONFIGURATION;

Configuration - DRSolution

  Protection Mode: MaxAvailability
  Members:
  South_Sales - Primary database
    Warning: ORA-16629: Database reports a different protection level from the protection mode.

    North_Sales - Physical standby database 
      Warning: ORA-16854: apply lag could not be determined

Fast-Start Failover:  Disabled

Configuration Status:
WARNING   (status updated 41 seconds ago)

ただし、REDO Applyで再びREDOの適用が開始されると、構成はSUCCESS状態に戻ります。

DGMGRL> SHOW CONFIGURATION;

Configuration - DRSolution

  Protection Mode: MaxAvailability
  Members:
  South_Sales - Primary database
    North_Sales - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 59 seconds ago)