Oracle 11g Data Guard: How to start and stop Redo Apply
1 Starting Redo Apply To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement. You
1 Starting Redo Apply
To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.
You can specify that Redo Apply runs as a foreground session or as abackground process, and enable it with real-time apply.
-
To start Redo Apply in the foreground, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;
- If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.
-
To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
alterdatabase recover managed standby database disconnect from session;
- This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks. This does not disconnect the current SQL session.
-
To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For example:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;
alterdatabase recover managed standby database using current logfile disconnect fromsession;
2 Stopping Redo Apply
To stop Redo Apply, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3 Advanced Configuration
3.1 Using Real-Time Apply to ApplyRedo Data Immediately
If the real-time apply feature is enabled, apply services can applyredo data as it is received, without waiting for the current standby redo logfile to be archived. This results in faster switchover and failover timesbecause the standby redo log files have been applied already to the standbydatabase by the time the failover or switchover begins.
Use the ALTER DATABASE statement to enable the real-time applyfeature, as follows:
- For physical standby databases, issue the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE statement.
- For logical standby databases, issue the ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE statement.
Real-time apply requires a standbydatabase that is configured with a standby redo log and that is in ARCHIVELOGmode.
The figure belowshowsa Data Guard configuration with a local destination and a standby destination.As the remote file server (RFS) process writes the redo data to standby redolog files on the standby database, apply services can recover redo from standbyredo log files as they are being filled.
3.2 Specifying a Time Delay for theApplication of Archived Redo Log Files
In some cases, you may want to create a time lag between the timewhen redo data is received from the primary site and when it is applied to thestandby database. You can specify a time interval (in minutes) to protectagainst the application of corrupted or erroneous data to the standby database.When you set a DELAY interval, it does not delay the transport of the redo datato the standby database. Instead, the time lag you specify begins when the redodata is completely archived at the standby destination.
Note:
If you define a delay for a destination that has real-time applyenabled, the delay is ignored.
Specifying a Time Delay
You can set a time delay on primary and standby databases using theDELAY=minutes attribute of theLOG_ARCHIVE_DEST_n initializationparameter to delay applying archived redo log files to the standby database. Bydefault, there is no time delay. If you specify the DELAY attribute withoutspecifying a value, then the default delay interval is 30 minutes.
Canceling a Time Delay
You can cancel a specified delay interval as follows:
-
For physical standby databases, use the NODELAY keyword of the RECOVER MANAGED STANDBY DATABASE clause:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY; -
For logical standby databases, specify the following SQL statement:
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;
These commands result in apply services immediately beginning toapply archived redo log files to the standby database, before the time intervalexpires.
Using Flashback Database as anAlternative to Setting a Time Delay
As an alternative to setting an apply delay, you can use FlashbackDatabase to recover from the application of corrupted or erroneous data to thestandby database. Flashback Database can quickly and easily flash back astandby database to an arbitrary point in time.
作者:xiangsir
QQ:444367417
MSN:xiangsir@hotmail.com

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









Oracle Tablespaceサイズを照会するには、次の手順に従ってください。クエリを実行して、TableSpace名を決定します。DBA_TABLESPACesからTableSpace_Nameを選択します。クエリを実行してテーブルスペースのサイズをクエリします:sum(bytes)をtotal_size、sum(bytes_free)asavail_space、sum(bytes) - sum(bytes_free)as sum(bytes_free)as dba_data_files from tablespace_

Oracle View暗号化により、ビュー内のデータを暗号化でき、それにより機密情報のセキュリティが強化されます。手順には以下が含まれます。1)マスター暗号化キー(MEK)の作成。 2)暗号化されたビューを作成し、暗号化されるビューとMEKを指定します。 3)暗号化されたビューにアクセスすることをユーザーに許可します。暗号化されたビューがどのように機能するか:ユーザーが暗号化されたビューを求めてクエリをするとき、OracleはMEKを使用してデータを復号化し、認定ユーザーのみが読み取り可能なデータにアクセスできるようにします。

データインポート方法:1。SQLLOADERユーティリティを使用します。データファイルを準備し、制御ファイルを作成し、SQLLoaderを実行します。 2。IMP/EXPツールを使用します。データをエクスポートし、データをインポートします。ヒント:1。ビッグデータセットに推奨されるSQL*ローダー。 2。ターゲットテーブルが存在する必要があり、列定義が一致します。 3。インポート後、データの整合性を検証する必要があります。

Oracleテーブルの作成には、次の手順が含まれます。作成テーブルの構文を使用して、テーブル名、列名、データ型、制約、およびデフォルト値を指定します。テーブル名は簡潔で説明的である必要があり、30文字を超えてはなりません。列名は説明的でなければならず、データ型は列に保存されているデータ型を指定します。 NOT NULL制約により、列でnull値が許可されていないことが保証され、デフォルト句は列のデフォルト値を指定します。テーブルの一意の記録を識別する主要なキーの制約。外部キーの制約は、表の列が別のテーブルの主キーを指していることを指定します。主要なキー、一意の制約、デフォルト値を含むサンプルテーブル学生の作成を参照してください。

Oracleインストール障害のためのアンインストールメソッド:Oracleサービスを閉じ、Oracleプログラムファイルとレジストリキーを削除し、Oracle環境変数をアンインストールし、コンピューターを再起動します。アンインストールが失敗した場合、Oracle Universal Uninstallツールを使用して手動でアンインストールできます。

Oracleでインスタンス名を表示するには3つの方法があります。「sqlplus」と「v $ instanceからselect instance_name;」を使用します。」コマンドラインのコマンド。 「show instance_name;」を使用しますSQL*Plusのコマンド。オペレーティングシステムのタスクマネージャー、Oracle Enterprise Manager、またはオペレーティングシステムを介して、環境変数(LinuxのOracle_Sid)を確認してください。

Oracleで時間を取得するには、次の方法があります。Current_Timestamp:現在のシステム時間を秒に正確に返します。 systimestamp:current_timestampよりも正確で、ナノ秒。 sysdate:時間部分を除く現在のシステム日付を返します。 to_char(sysdate、 'yyy-mm-dd hh24:mi:ss'):現在のシステムの日付と時刻を特定の形式に変換します。抽出:1年、月、時間など、時間の値から特定の部分を抽出します。

AWRレポートは、データベースのパフォーマンスとアクティビティスナップショットを表示するレポートです。解釈の手順には、アクティビティスナップショットの日付と時刻の識別が含まれます。アクティビティとリソース消費の概要をご覧ください。セッションのアクティビティを分析して、セッションの種類、リソース消費、待機イベントを見つけます。遅いSQLステートメント、リソース競合、I/Oの問題などの潜在的なパフォーマンスボトルネックを見つけます。待機イベントを表示し、パフォーマンスのためにそれらを特定して解決します。ラッチとメモリの使用パターンを分析して、パフォーマンスの問題を引き起こしているメモリの問題を特定します。
