RAC to single instance Data Guard Physical Standby
SHUTDOWN STANDBY DATABASE
step 1: Disable standby archive writing:
Primary/production database
| 1 | alter system set log_archive_dest_state_2=defer scope = both sid = '*'; | 
step 2: auto recovery standby de deaktif edilir.
| 1 | alter database recover managed standby database cancel; | 
PS: In case of RAC: above command should run on just ONE of the standby RAC node.
| 1 | shutdown immediate | 
RAC ortamında tüm stanby node larda uygulanmalı
STARTUP STANDBY DATABASE
Gerek olursa archivelog lar standby a taşınır.
| 1 | $scp /opt/oracle/archive/*.arc oracle@DR-Site-IP:/opt/oracle/archive | 
Step 2: standby database açılır ve automatic recovery başlatılır.
| 1 2 3 | startup nomount SQL> alter database mount standby database; SQL> alter database recover managed standby database disconnect from session; | 
PS: RAC ortamında bütün standby node larda uygulanır.
| 1 2 | startup nomount SQL> alter database mount standby database; | 
step 3: standby archive writing aktif edilir (enable)
primary/production database
| 1 | alter system set log_archive_dest_state_2=enable scope = both sid = '*'; | 
RAC ortamında sadece bir node da çalıştırılması yeterli (sid=’*’).
*****************************************************************************************************
Bozulmadan önleyelim. Ayrıntılı bilgi için Doc ID 1302539.1
primary
| 1 2 3 | alter system set DB_BLOCK_CHECKSUM=FULL scope=both sid='*'; alter system set DB_BLOCK_CHECKING=FULL scope=both sid='*'; alter system set DB_LOST_WRITE_PROTECT=TYPICAL scope=both sid='*'; | 
standby
| 1 2 3 | alter system set DB_BLOCK_CHECKSUM=FULL scope=both sid='*'; alter system set DB_BLOCK_CHECKING=FULL scope=both sid='*'; alter system set DB_LOST_WRITE_PROTECT=TYPICAL scope=both sid='*'; | 
Errors & Resolution
1
| 1 2 3 4 5 6 7 | ORA-15025: could not open disk "/dev/oracleasm/disks/DATA001" ORA-27041: unable to open file Linux-x86_64 Error: 13: Permission denied Additional information: 9 SUCCESS: diskgroup DATA was mounted Errors in file /u01/app/oracle/diag/rdbms/stdhira/stdhira/trace/stdhira_ora_26491.trc (incident=7361): ORA-00600: | 
Hatasi alinirsa
root ile
| 1 | /u01/11.2.0/grid/bin/setasmgid o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle | 
2
Deletion of Applied Archivelogs
If the archivelog files are being managed in the Fast Recovery Area then automatic deletion of backed up and applied archivelog files can be setup by issuing the following RMAN configure command on the primary database:
| 1 | CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY BACKED UP <#> TIMES TO DISK; | 
Creating a physical standby from ASM primary [ID 787793.1]
http://www.datadisk.co.uk/html_docs/oracle_dg/troubleshooting.htm
http://www.datadisk.co.uk/html_docs/oracle_dg/troubleshooting.htm
http://www.oracledba.org/">http://www.oracledba.org
3
Data Guard Broker Status Summary:
Type Name Severity Status
| 1 2 3 | Configuration dg_broker Warning ORA-16608 Primary Database hira Success ORA-00000 Physical Standby Database stdhira Warning ORA-16792 | 
hata varsa
show database 'stdhira’ 'InconsistentProperties’;
ile farkli degerler bulunup (bazan degerler ayni olsa da ) scope=spfile/both ile degistirince düzeliyor.
4
| 1 2 3 4 5 6 | SQL Execution error=604, sql=[alter system set log_archive_dest_1='']. See error stack below. ORA-00604: error occurred at recursive SQL level 1 ORA-02097: parameter cannot be modified because specified value is invalid ORA-16028: new LOG_ARCHIVE_DEST_1 causes less destinations than LOG_ARCHIVE_MIN_SUCCEED_DEST requires ORA-00604 ORA-02097 ORA-16028 BUG 12535659 - BROKER OVERRIDES MANDATORY/LOG_ARCHIVE_MIN_SUCCEED_DEST | 
Solution
Ozet
o anki primary de
| 1 | remove configuration preserve destinations; | 
RAC
| 1 | alter system set log_archive_dest_1='location=+fra' scope=both sid='*'; | 
single instance
| 1 | alter system set log_archive_dest_1='location=+fra' scope=both ; | 
metalink te ise asagidaki adimlar anlatilmis.
a. Use DGMGRL to gather information about the Broker configuration.
- From current Primary
| 1 2 | DGMGRL> show configuration verbose; DGMGRL> show database verbose <db_unique_name>; | 
# This should be done for the primary and each standby.
b. Remove the Broker configuration.
- From current Primary:
| 1 2 | DGMGRL> connect sys/password DGMGRL> remove configuration preserve destinations; | 
# This will ensure standby operations continue while the Broker
# configuration is being re-created.
c. Change the LOG_ARCHIVE_DEST_n destinations defined with LOCATION to remove DB_UNIQUE_NAME.
| 1 | SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/u01/arch'; | 
# This must be done on all databases in the Data Guard environment
# that Broker will manage.
d. Re-create the Broker configuration.
- From current Primary:
| 1 2 | DGMGRL> connect sys/password DGMGRL> create configuration .... | 
# Use the info from Step #1 to re-create the Broker configuration
# and modify the properties on each database before enabling.
e.
ORA-16826: apply service state is inconsistent with the DelayMins property
dgmgrl configurasyonunu disable/enable edince düzeliyor.
| 1 2 | disable configuration enable configuration | 
5 . Bağlantı sorunları yaşandığında bakılacak yerler
| 1 2 3 4 | show parameter LOCAL_LISTENER ---> değer görülmeli ALTER SYSTEM REGISTER; ALTER SYSTEM set LOCAL_LISTENER=LISTENER alter system set LOCAL_LISTENER='(ADDRESS = (PROTOCOL=TCP)(HOST=stddbk.sysdba.org)(PORT=1521))' scope=both; | 
6.Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2013-12-30_01-26-43PM/jdk/jre/lib/sparcv9/motif21/libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory….
Çözüm
| 1 | export AWT_TOOLKIT=XToolkit | 
Yararlanilan kaynaklar :
http://tahiti.oracle.com
http://asanga-pradeep.blogspot.com/2010/11/rac-to-single-instance-physical-standby.html
http://easyoradba.com/2012/11/20/rac-to-single-instance-dataguard-oracle-11gr2-physical-standby/
http://www.cozumpark.com/blogs/oracle/archive/2011/02/26/oracle-11g-r2-11-2-0-2-rac-mimarisinde-data-guard-kurulumu-ve-y-netimi-d-nyada-lk-ve-tek.aspx
http://dpmappsdba.blogspot.com/p/rac-to-single-instance-physical-standby.html
http://unixoracledba.wordpress.com/2012/03/29/how-to-create-a-single-instance-physical-standby-dataguard-for-a-rac-database/
*****************************************************************************************************
