We have moved to http://onlineAppsDBA.com kindly check http://onlineAppsDBA.comin future
Configure Oracle Dataguard |
Tuesday, November 28, 2006 |
|
Yesterday we looked at Data Guard overview in Oracle Database http://becomeappsdba.blogspot.com/2006/11/oracle-dataguard-for-business.html , Today I am going to cover step by step configuration for Oracle Dataguard & may be in next or future posts I will discuss on common mistakes which you can do while configure dataguard / standby database.
Below steps are based on assumptions that Primary Database is on Machine1.domain.com & Standby database is on Machine2.domain.com . Database Instance Name is PROD and database listener is listening on port 1525. Mount point on primary & standby database are same (If they are not you need to set parameter db_file_convert)
Assumptions I am assuming using LGWR, ASYNC option with log shipping service which means , LGWR (Log Writer process will be used to write to standby site instead of ARC archiver process) ASYNC (Redo logs to standby is asynchronous to primary site)
You may have to change options with log shipping service (LOG_ARCHIVE_DEST_n) depending on data protection mode you wish to choose. (I am using Maximum Performance Mode - Default Mode)
Enable Archive log For standby database configuration your primary database should be running in achieve log mode. In order to convert your primary database into archive log mode follow these steps
SQL> SHUTDOWN SQL> STARTUP MOUNT SQL> ALTER DATABASE ARCHIVELOG; SQL> ALTER DATABASE OPEN;
SQL> alter system set LOG_ARCHIVE_DEST_1 ='LOCATION=/u01/oracle/data/arch' scope=spfile; (I am assuming that you are using spfile here , if you are using pfile skip scope=spfile)
SQL> alter system set LOG_ARCHIVE_DEST_2 ='SERVICE=PROD_remote1.domain.com LGWR ASYNC REOPEN=60' scope=spfile; (We will create above TNS Alias in next step) SQL> alter system log_archive_dest_2='DEFER' (Defer this until you have standby system Up)
SQL> shutdown immediate SQL> startup
You should see archive logs generated after this on standby site
Enable Force Logging You should enable Force logging in primary database else if some transaction which doesn't generate redo log can corrupt your standby database. (Careful in OLTP transactions or long running requests in Apps) SQL> ALTER DATABASE FORCE LOGGING;
Set Initialization Parameter SQL> alter system set fal_client = ÂPROD.domainname.com scope=both; SQL> alter system set fal_server = ÂPROD_remote1.domainname scope=both; (Here FAL, Fetch Archive Log is used to fetch archives in case gap in archives arises because of any reason)
SQL> alter system set STANDBY_FILE_MANAGEMENT=AUTO scope=both; (This is used to automatically generate file in standby site like if you add a datafile, this will create one in standby site as well)
Create Standby Control file & copy datafile including oracle_home Create standby control file as SQL> alter DATABASE CREATE STANDBY CONTROLFILE AS '/u01/oracle/home/standby.ctl'
You can installed New Database on standby site or Use ORACLE_HOME software from primary site on standby site. Copy datafiles, redologs, initializations file, tnsnames.ora, listener.ora & control file from primary site to standby site.
Other steps & few important things w.r.t. dataguard coming in Next Post...Labels: 11i, advanced |
We have moved to kindly check onLineAppsDBA.com in future
|
|
del.icio.us
¦
Digg This
¦
My Yahoo
¦
Reddit
¦
BlinkList
¦
Furl It
¦
Email This
¦
Leave Your Comments
|
posted by Atul Kumar @ 8:18 PM
  |
|
11 Comments: |
-
Thanks for this DG post. I do have a question, however. How do you use a copied OH on the standby node? Oracle Home has so many embedded hostname occurances throughout... are you speaking of an OH clone ?
-
Kevin, I agree that there will be some hostname entries in oracle_home like for db console & that will not work but you can overcome that by using primary database hostname as virtual host name in standby like lets in ex. above primary hostname was hostname1.domainname.com , then in standby host /etc/hosts we can use IP_of_standby hostname2.domainname.com hostname2 hostname1.domainname.com hostname1
Now be careful when you use above solution, your tnsnames.ora should use IP address in standby site instead of hostname
You can avoid these issues by doing a fresh Install on standby site as well.
Atul
-
Kevin,
Another Option you have is to clone the Oracle Home.
you have option in runInstaller -clone
you can go through runInstaller help on this.
Suresh Oracle Corp.
-
Atul, Excellent urs is the best Blog spot i have ever seen.
Kevin, You can go for Oracle Clone option coming along with runinstaller -clone.
Suresh Oracle Corp.
-
Suresh, Thanks a lot for your comments. Thanks for sharing clone option in Installer with everyone .
Everyday is new learning & I would like to explore clone option in my next configuration :)
Atul
-
Hi,
Thanks for the informative guide so far! Was wondering when you were going to complete it and my main question was that is there a way you can automae monitoring of what logs have been applied to the standby database (on Windows). Hence once applied delete the log?
Thanks in advance
-
Hi Anonymous, I missed it completely that I have to finish it . Try to cover in a week or two
-
hi,
when you are going to update the remaing steps?and also it will be helpful if you exlpain more in configuring the DG on the same host.
Thanks; K
-
Hi, Atul,
Can I have two different types of standby databases, like one physical and one logical standby database?
I recently build one physical standby, it works well after some workaround. But new requirements is coming, a logical standby in need. Do you have the doc to implement the system?
Thanks,
Hank
-
Check at
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#g105412
-
Logical Standby is not supported with oracle apps ebusiness suite 11i
IK
|
|
<< Home |
|
|
|
Thanks for this DG post. I do have a question, however. How do you use a copied OH on the standby node? Oracle Home has so many embedded hostname occurances throughout... are you speaking of an OH clone ?