Sunday, May 24, 2009

Data Guard Installation (Step 1)

PART 1

This focuses on setting up a test environment on a single node.
The DBA can adapt this to set up a production environment.
By Rizwan Shafiq

Step 1:
Install an Oracle database and validate it is in Archive log Mode.
If Archive log is disabled enable it before continuing.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:\oracle\product\10.2.0\archive
Oldest online log sequence 66
Next log sequence to archive 68
Current log sequence 68
Step 2:
Enable force logging mode.
SQL> alter database force logging;
Database altered.
Step 3:
Identify all the datafiles to copy for a cold back up or do
an RMAN backup.Since this is test environment I will shutdown
the database and do a cold backup.
SQL> select name from v$datafile;
NAME
———————————————————————-
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\USERS01.DBF
C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\EXAMPLE01.DBF

SQL>
Step 4:
In a windows environment create the service for the standby database.
You will also have to create the folders and environment for the
standby database.
C:\>oradim -new -sid stby -intpwd teststby -startmode manual
C:\oracle\product\10.2.0\oradata\teststby – Create this folder
C:\oracle\product\10.2.0\admin\teststby – Create this folder and
all the folders underneath. Like bdump, udump, etc. Or just copy
the production one.
Note: Since this is a dataguard environment on a single test node
I do not have to install all the Oracle software again.
Step 5:
Shutdown Primary database and move the datafiles
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Move the datafiles from step 3 into the oradata standby environment.
C:\oracle\product\10.2.0\oradata\test
C:\oracle\product\10.2.0\oradata\teststby
Step 6:
Create a standby control file and start the database
SQL> startup mount;
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS
‘ C:\oracle\product\10.2.0\oradata\teststby\teststby.ctl’;
Database altered.
SQL> alter database open;

Step 7: Create the Primary and Standby init.ora/spfile to
facilitate Dataguard.

SQL> CREATE PFILE= ‘C:\oracle\product\10.2.0\testinit.ora’
from spfile;
File created.

Primary Database:

1 Comments:

At June 8, 2009 at 10:06 AM , Blogger asfer said...

you are are provide a complete guideline for beginner and i hope it is usefull for all people who are really student and make helpfull for them

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home