Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
17Activity
0 of .
Results for:
No results containing your search query
P. 1
Data Guard

Data Guard

Ratings: (0)|Views: 885|Likes:
Published by pratikl

More info:

Published by: pratikl on Dec 24, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/09/2014

pdf

text

original

 
ORACLE 10G – MANUALLY CREATE A PHYSICAL STANDBY DATABASEUSING DATA GUARDStep-by-step instructions on how toCreate a Physical Standby Database on Unix and Windows servers.
By Haili Jiao
10g OCP & 9i OCAMay 2008Oracle 10g Data Guard is a great tool to ensure high availability, data protection anddisaster recovery for enterprise data. I have been working on Data Guard/Standbydatabases using both Grid control and SQL command line for a couple of years, and mylatest experience with Data Guard was manually creating a Physical Standby Databasefor a Laboratory Information Management System (LIMS) half a year ago. I maintain itdaily and it works well. I would like to share my experience with the other DBAs.In this example the database version is 10.2.0.3.. The Primary database and Standbydatabase are located on different machines at different sites. The Primary database iscalled PRIM and the Standby database is called STAN. I use Flash Recovery Area, andOMF.
I. Before you get started:
1.
 
Make sure the operating system and platform architecture on the primary andstandby systems are the same;2.
 
Install Oracle database software without the starter database on the standby serverand patch it if necessary. Make sure the same Oracle software release is used onthe Primary and Standby databases, and Oracle home paths are identical.3.
 
Test the Standby Database creation on a test environment first before working onthe Production database.
II. On the Primary Database Side:1.
 
Enable forced logging on your primary database:
SQL> ALTER DATABASE FORCE LOGGING;
2.
 
Create a password file if it doesn’t exist.
1) To check if a password file already exists, run the following command:
SQL> select * from v$pwfile_users;
2) If it doesn’t exist, use the following command to create one:- On Windows:
$cd <Oracle_home>\database
1
 
$orapwd file=pwdPRIM.ora password=xxxxxxxx force=y(Note: Replace <Oracle_Home> with the actual Oracle home path, and xxxxxxxxx with thepassword for the SYS user.)
- On UNIX:
$Cd $ORACLE_HOME/dbs$Orapwd file=pwdPRIM.ora password=xxxxxxxx force=y(Note: Replace xxxxxxxxx with your actual password for the SYS user.)
3.
 
Configure a Standby Redo log.
1) The size of the standby redo log files should match the size of the current Primarydatabase online redo log files. To find out the size of your online redo log files:
SQL> select bytes from v$log;BYTES----------524288005242880052428800
2) Use the following command to determine your current log file groups:
SQL> select group#, member from v$logfile;
3) Create standby Redo log groups.My primary database had 3 log file groups originally and I created 3 standby redo loggroups using the following commands:
SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50M;SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 SIZE 50M;SQL>ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 SIZE 50M;
4) To verify the results of the standby redo log groups creation, run the followingquery:
SQL>select * from v$standby_log;
4.
 
Enable Archiving on Primary.
If your primary database is not already in Archive Log mode, enable the archive logmode:
SQL>shutdown immediate;SQL>startup mount;SQL>alter database archivelog;SQL>alter database open;SQL>archive log list;
5.
 
Set Primary Database Initialization Parameters
Create a text initialization parameter file (PFILE) from the server parameter file(SPFILE), to add the new primary role parameters.1) Create pfile from spfile for the primary database:2
 
- On Windows:SQL>create pfile=’<Oracle_home>\database\pfilePRIM.ora’ from spfile;(Note- specify your Oracle home path to replace ‘<Oracle_home>’).
- On UNIX:
SQL>create pfile=’<Oracle_home>/dbs/pfilePRIM.ora’ from spfile;(Note- specify your Oracle home path to replace ‘<Oracle_home>’).
2) Edit this pfile to add the new primary and standby role parameters: (Here the filepaths are from a windows system. For UNIX system, specify the path accordingly)
db_name=PRIMdb_unique_name=PRIMLOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM,STAN)'LOG_ARCHIVE_DEST_1='LOCATION=F:\Oracle\flash_recovery_area\PRIM\ARCHIVELOGVALID_FOR=(ALL_LOGFILES,ALL_ROLES)DB_UNIQUE_NAME=PRIM'LOG_ARCHIVE_DEST_2='SERVICE=STAN LGWR ASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=STAN'LOG_ARCHIVE_DEST_STATE_1=ENABLELOG_ARCHIVE_DEST_STATE_2=ENABLELOG_ARCHIVE_FORMAT=%t_%s_%r.arcLOG_ARCHIVE_MAX_PROCESSES=30remote_login_passwordfile='EXCLUSIVE'FAL_SERVER=STANFAL_CLIENT=PRIMSTANDBY_FILE_MANAGEMENT=AUTODB_FILE_NAME_CONVERT='E:\oracle\product\10.2.0\oradata\STAN\DATAFILE','E:\oracle\product\10.2.0\oradata\PRIM\DATAFILE'LOG_FLE_NAME_CONVERT=’E:\oracle\product\10.2.0\oradata\STAN\ONLINELOG’,’E:\oracle\product\10.2.0\oradata\PRIM\ONLINELOG’,’F:\Oracle\flash_recovery_area\STAN\ONLINELOG’,’F:\ Oracle\flash_recovery_area\PRIM\ONLINELOG’
(Note: For DB_FILE_NAME_CONVERT -Specify the location of the standby DB datafilesfollowed by the primary location;For LOG_FLE_NAME_CONVERT - Specify the location of the standby DB online redo logfiles followed by the primary location.)
6.
 
Create spfile from pfile, and restart primary database using the new spfile.
Data Guard must use SPFILE. Create the SPFILE and restart database.
-
 
On windows:SQL> shutdown immediate;SQL> startup nomount pfile=’<Oracle_home>\database\pfilePRIM.ora’;SQL>create spfile from pfile=’<Oracle_home>\database\pfilePRIM.ora’;-- Restart the Primary database using the newly created SPFILE.SQL>shutdown immediate;SQL>Startup;(Note- specify your Oracle home path to replace ‘<Oracle_home>’).
3

Activity (17)

You've already reviewed this. Edit your review.
Aswin Shankar liked this
1 thousand reads
1 hundred reads
drummerr liked this
Mushtaq Ahmed liked this
Mushtaq Ahmed liked this
brijesh1747 liked this
Shaik Abbas liked this
haripemmasani liked this
sharmakaushal liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->