Changing Primary DB Character Set without Recreate DG Physical Standby_1124165.1
Changing Primary Database Character Set without Recreating Data Guard Physical Standbys (文件 ID 1124165.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 11.1.0.7 to 11.2.0.4 [Release 11.1 to 11.2]Information in this document applies to any platform. PurposeThis note describes how Oracle Data Guard supports changing both the database and national character set of a primary database without requiring customers to recreate any physical standby databases in the configuration. ScopeThis note is intended for database administrators. DetailsIntroduction:Oracle Data Guard supports changing both the database and national character set of a primary database without requiring customers to recreate any physical standby databases in the configuration. In previous releases a physical standby database had to be recreated from a backup after a character set conversion. It describes instead a series of Oracle recommended steps that will allow you to continue operating your physical standby with minimal disruption when performing character set conversion of a primary database. Background:
Background:
[Step 1]Before you execute the conversion?? steps at the primary database, ensure that the physical standby is mounted and caught up with the primary database.
SQL> alter database recover managed standby database cancel;
Database altered. SQL> shutdown abort ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 255291392 bytes Fixed Size 1341788 bytes Variable Size 230688420 bytes Database Buffers 16777216 bytes Redo Buffers 6483968 bytes Database mounted.
SQL> alter database convert to physical standby;
Database altered. SQL> shutdown ORA-01507: database not mounted ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 255291392 bytes Fixed Size 1341788 bytes Variable Size 230688420 bytes Database Buffers 16777216 bytes Redo Buffers 6483968 bytes Database mounted. SQL> alter database recover managed standby database using current logfile disconnect; Database altered.
SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.
At the primary database query the current sequence# of the open thread:
SQL> select thread#, sequence# from v$log where status='CURRENT';
THREAD# SEQUENCE# ---------- ---------- 1 3
At the physical standby database, query the sequence# redo apply is applying from:
SQL> select thread#, sequence#, status from v$managed_standby where process='MRP0';
THREAD# SEQUENCE# STATUS ---------- ---------- ------------ 1 3 APPLYING_LOG
Since redo apply is applying from sequence# 3 which is the current sequence# of the open thread at the primary, redo apply has caught up with the primary.
Note that converting a Snapshot standby to a mounted physical standby database or bringing a physical standby that is real-time query mode to the mounted state will cause downtime for applications that typically use these two features. This is unavoidable - therefore this downtime should be scheduled based on business needs and requirements. [Step 2]
You can skip this step at the physical standby if a decision was made to not use flashback database technology at the physical standby database.
SQL> alter database recover managed standby database cancel;
Database altered. SQL> alter database flashback on; Database altered. SQL> alter database recover managed standby database using current logfile disconnect; Database altered.
[Step 3]If Data Guard Broker is enabled, disable it using DGMGRL. It will be enabled after the conversion has taken place.
DGMGRL> disable configuration;
Disabled.
SQL> shutdown
Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 255291392 bytes Fixed Size 1341788 bytes Variable Size 230688420 bytes Database Buffers 16777216 bytes Redo Buffers 6483968 bytes Database mounted.
[Step 4]You can skip this step if you have decided not to use flashback database at your primary database.
SQL> alter database flashback on;
Database altered. SQL> create restore point prod_grsp guarantee flashback database; Restore point created.
[Step 5]Open the primary database in RESTRICTED session mode but do not do the conversion in the DMU tool yet or , when using csscan/Csalter, don't run CSALTER yet .
SQL> alter system set job_queue_processes=0 scope=memory;
System altered. SQL> alter system set aq_tm_processes=0 scope=memory; System altered. SQL> alter system enable restricted session; System altered. SQL> alter database open; Database altered.
[Step 6]
Switch out of the current log sequence at the primary database and verify that redo apply has applied this log sequence.
SQL> alter system archive log current;
System altered. SQL> select thread#, sequence# from v$log where status='CURRENT'; THREAD# SEQUENCE# ---------- ---------- 1 3
SQL> select thread#, sequence#, status from v$managed_standby where process='MRP0';
THREAD# SEQUENCE# STATUS ---------- ---------- ------------ 1 3 APPLYING_LOG
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database recover managed standby database cancel;
Database altered. SQL> create restore point standby_grsp guarantee flashback database; Restore point created. SQL> alter database recover managed standby database using current logfile disconnect; Database altered.
[Step 7]
Execute the final conversion steps on the primary database by doing the conversion of the primary database using the DMU tool "convert database" option or running CSALTER . [Step 8]
Start redo apply at the physical standby database if it is not active. Note that redo apply will not be active if you performed Step 6a above.
DGMGRL> enable configuration;
Enabled.
[Step 9]
Once the standby has applied all redo logs generated by the conversion procedure, it can be opened in real-time query mode or converted to a Snapshot Standby. Even if you don'??t intend to open the standby in real-time query mode or convert it to a Snapshot standby, open it read only once after stopping redo apply. The act of opening the standby read only from the mounted state will perform the final actions necessary to update the standby control file sections to reflect the new character set reflected in the SYS.PROPS$ tables.
SQL> alter database open read only;
Database altered.
alter database open
Thu Apr 08 15:42:42 2010 SMON: enabling cache recovery Dictionary check beginning Dictionary check complete Updating character set in controlfile to UTF8 No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) Physical standby database opened for read only access. Completed: alter database open
Failover StepsNote the fallback plan below in case of disaster:
SQL> startup mount;
ORACLE instance started. Total System Global Area 255291392 bytes Fixed Size 1341788 bytes Variable Size 230688420 bytes Database Buffers 16777216 bytes Redo Buffers 6483968 bytes Database mounted. SQL> flashback database to restore point prod_grsp; Flashback complete. SQL> alter database open resetlogs; Database altered.
SQL> alter database recover managed standby database cancel;
Database altered. SQL> flashback database to restore point standby_grsp; Flashback complete.
SQL> alter database activate standby database;
Database altered. SQL> alter database open; Database altered.
ReferencesNOTE:260192.1 - Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) in 8i, 9i , 10g and 11gNOTE:1272374.1 - The Database Migration Assistant for Unicode (DMU) Tool NOTE:225912.1 - Changing Or Choosing the Database Character Set ( NLS_CHARACTERSET ) |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1291495/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Creating Physical Standby using RMAN Duplicate Without Shutting Primary_789370.1
- Creating Physical Standby using RMAN Duplicate Without Shutting down The Primary [ID 789370.1]
- Creating a physical standby from ASM primaryASM
- 【DG】Data Guard搭建(physical standby)
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- DG物理standby,Failover之後原primary重回DGAI
- Unknown initial character set index ‘255‘ received from server. Initial client character set can beIndexServerclient
- Indexing Mixed-Character Set ColumnsIndex
- character_set_database的意義Database
- 【Mysql】character-set-server引數MySqlServer
- oracle9204(physical dg)配置_指南Oracle
- Creating a physical standby from ASM primary [ID 787793.1]ASM
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- 【轉】修改Oracle字符集(character set)Oracle
- mysql:Variable 'character_set_client' can't be set to the value of 'NULL'解決MySqlclientNull
- Configure Oracle Dataguard Primary-ASM to Physical-ASM薦OracleASM
- Oracle 10中修改字符集(character set)Oracle
- Variable 'character_set_client' can't be set to the value of Null的解決方法clientNull
- 【RAC,DATAGUARD】Creating a physical standby from ASM (RAC ) primary之四ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之三ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary 之二ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之一ASM
- How To Drop, Create And Recreate DB Control In A 10g DatabaseDatabase
- OGG How to handle / replicate tables with no (without) primary key (PK) or unique index (UI) (UPI) [IndexUI
- [mysql] 批量匯入提示: Variable ‘character_set_client’ can’t be set to the value of ‘NULLMySqlclientNull
- oracle10g data guard(dg)__flashback_physical databaseOracleDatabase
- Rename a Datafile in Primary Within in Physical Dataguard Configuration_733796.1
- Unable To Recreate DG Fast Start Failover Configuration With DGMGRL-454418.1ASTAI
- Case two -- Recover a datafile in primary site from the backup taken in standby site without using c
- DB Block Gets、Consistent Gets、Physical ReadsBloC
- mysql關於字符集character set的總結MySql
- rhel4 mysql5.5 字符集_character setMySql
- ORACLE10G DG配置下Physical Standby Database的管理OracleDatabase
- Oracle 18c&19c physical dg切換總結Oracle
- MySQL字符集和校對規則(character set & collation)MySql
- mysqlbinlog: unknown variable 'default-character-set=utf8'MySql
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMANGUIIDEORMASM
- recursive calls, db block gets,consistent gets,physical ReadsBloC