Oracle 10g Physical standby database configuration

PREPARING THE PRIMAY DATABASE

SQL > alter database force logging

1. create a password file.

2. set initialization parameters in primary database.

a.
 db_name = databasename
 db_unique_name = databasename
 log_archive_config = ' DG_CONFIG = (primarydbname,standbydbname)

b.
log_archive_dest_2=
'service = standbydbname
valid for = ( online_logfiles,primary_role)
db_unique_name=standbydbname'

c.
log_archive_dest_state_2 = enable
log_archive_dest_state_1 = enable
log_archive_dest_1= 'LOCATION= Archive destination in primary database
valid for (all_logfiles,all_roles)
db_unique_name = primarydbname

d.
db_file_name_convert='filelocation in primary database','filelocation in standby database'

fal_server = standbydbname
fal_client = primarydbname

e.
log_file_name_convert = 'log destination in primary database',' log destination in standby database'

note:- above parameter is required if the standby database is on the same system as primary database located or on a saparate system that uses different path.

f.
log _archive_format = %d_%t_%s_%r.arc

%d => dbid, %t=>thred number, %s=> zero filled sequence number,
%r => resetlog_id.

note :- Default value is os dependent.

g.
standby_file_management=auto.

note :- use to maintain consistency when you add o delete a datafile on primry database.

h.
Archive_log_target= 1800

note:- set to the number of seconds after which a log switch mus happen even if the logfile is not full.

i.
log _archive_trace= value

note :- optional only used for digonise purpose.

remote_login passwordfile = exclusive.

control_files => change this parameter value in standby database pfile.

connect RMAN session .

Create backup copy of primary database

RMAN > backup database.

Create a controlfile for standby database.

SQL > Alter database create standby database controlfile as ' specify location and name of the controlfile like boston.ctl'

Copying files to the standby database.

a. Backup of the datafiles.
b. standby controlfile.
c. initialization parameter file.

Spcifing a value for standby_archive_dest

standby_archive_dest = 'LOCATION = archive destination in standby database

Setting up the environment

a. if creating a standby database on windows platform, create a windows bassed service.

SQL> oradim -NEW -SID -INTPWD -STARTMODE

b. create password file

c. Configure listener for the primary and standby database.

d. Create oracle net service names.

e. Create a server parameter file for the standby database.

Starting the physical standby database and bring the standby database in read only mode.

SQL> Startup

SQL > Alter database recover managed standby database disconnect from session;

Note :- So that Redo apply runs in a background session.