Beruflich Dokumente
Kultur Dokumente
-- Fan Xiangrong
Agenda
Common changes
Agenda
Common changes
Password file
Create password file on standby doesnt work. You need to copy password file from primary to standby.
Add compression=enable to log_archive_dest_N parameter log_archive_dest_3 = 'service="(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=qadb27.qa.eba y.com)(PORT=1799))(CONNECT_DATA=(SID=TEST2 )))" compression=enable reopen=5 lgwr async' For 11g R1, it only uses compression when resolving gaps. If you set hidden parameter _REDO_TRANSPORT_COMPRESS_ALL=TRUE, it will use compression for all redo transport.
Compression rate is 24%. Different data can have different compress rate.
It needs License
Redo transport compression is a feature of the Oracle Advanced Compression option. You must purchase a license for this option before using the redo transport compression feature.
Agenda
Common changes
Active Standby
Simple Steps
Stop redo apply Open the database read only
Restart redo apply
SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE OPEN READ ONLY; SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT USING CURRENT LOGFILE;
Disallow operations
Any DML (insert, update, delete) Any DDL Access of local sequences DMLs on local temporary tables
V$database.current_scn records the current apply SCN. SQL> select scn_to_timestamp(current_scn) from v$database; SCN_TO_TIMESTAMP(CURRENT_SCN) --------------------------------------------------------------------------21-NOV-09 08.42.43.000000000 AM
Session level parameter STANDBY_MAX_DATA_DELAY(11g R2) The new STANDBY_MAX_DATA_DELAY session parameter can be used to specify a session-specific apply lag tolerance, measured in seconds, for queries issued by non-administrative users to a physical standby database that is in real-time query mode. Alter session set STANDBY_MAX_DATA_DELAY = { integer | NONE }
Snapshot database
A snapshot standby database is a fully update-able standby database that is created by converting a physical standby database into a snapshot standby database. Snapshot standby database receives and archives, but does not apply the redo data. Redo data received from the primary database is applied automatically once it is converted back into a physical standby database. All local updates will be discarded when snapshot database is converted back to physical standby database. In 10g version, we can do it manually.
Set the size for recovery area. Alter system set db_recovery_file_dest_size=<size> Set Flash recovery area. (unset db_recovery_file_dest and set db_recovery_file_dest_1) Alter system set db_recovery_file_dest=<path>
Bring the physical standby database to mount stage. Stop managed recovery if it is active. Convert to snapshot standby database. ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Shutdown the snapshot standby database. Bring the database to the mount stage. Issue the command
ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Shutdown the database and mount it . Start the media recovery process.
A corrupted data block in a primary database can be automatically replaced with an uncorrupted copy of that block from a physical standby database that is operating in real-time query mode. A corrupted block in a physical standby database can also be automatically replaced with an uncorrupted copy of the block from the primary database if LOG_ARCHIVE_CONFIG, LOG_ARCHIVE_DEST_n parameters are set on standby.
Setup listener Create an init.ora file with only db_name in it Create or copy a password file Startup nomount database Create spfile from pfile
Create spfile from pfile
Agenda
Common changes
Target:
583 575 595 601 576 665 574 647 oracle@qadb27 (P002) oracle@qadb27 (P003) oracle@qadb27 (P000) oracle@qadb27 (P001) oracle@qadb27 (P004) oracle@qadb27 (P006) oracle@qadb27 (P005) oracle@qadb27 (P007) log buffer space 0/0/0 0 0 0/0 log buffer space 0/0/0 0 0 0/0 direct path read temp 103/1929/1 3 direct path read temp 103/14729/1 -1 PX Deq: Execution Msg 268566527/2/0 PX Deq: Execution Msg 268566527/2/0 PX Deq: Execution Msg 268566527/1/0 PX Deq: Execution Msg 268566527/1/0 A A 0 0/0 0 0/0 0 1 0/0 0 1 0/0 0 1 0/0 0 1 0/0 14 14 13 13 A 14 A 14 I 1 I 2 I 1 I 1
14 13 13 13 13 13
Others
Statspack on standby (454848.1) Support different platforms (413484.1) Big performance boost in Oracle 11G Up to 100% increase in redo apply performance
Review
Common changes
Online modify logical standby parameters Compressed table is supported by logical standby (11g R2) SQL Apply will execute parallel DDLs in parallel