|
Standby Database on the same Server
:
Note: It is not recommended to
have standby database on the same sever though you can use this tip to
test or enhance your standby database concept only. Since this defeats the
purpose of a standby if your entire machine were to crash.
Problem Description:
You are setting up a Standby database environment in the same machine
as the primary database.
1. You issue....
alter database create standby controlfile as '$HOME/standby.ctl';
alter system archive log current;
2. copy this generated controlfile to directory where you intend to
place the standby database
3. Make a copy of the init.ora file to be used by the standby database
and include the appropriate initialization parameters to point to where
where the primary database files reside, followed by the directory path
where the (test) standby database will reside:
Oracle7 -- db_file_standby_name_convert and
log_file_standby_name_convert
Oracle8 -- db_file_name_convert and log_file_name_convert
Also edit the control_files parameter to point to the standby
controlfile
4. With the primary database shutdown, copy the redo log files and
database files to the standby directory
5. With the primary database now up, you try to mount the standby: you
will receive:
SVRMGR> alter database mount standby database;
alter database mount standby database *
ORA-01102: cannot mount database in EXCLUSIVE mode
6. If you shut the primary database down, the command succeeds but then
you get the same error when trying to open the primary database.
7. Deleting
the lk file made no difference
- but maybe that was because it was not really deleted as it was being
held open by some process.
Problem Explanation: The failure is because shared
memory has already been created for this ORACLE SID, and you are
attempting to create the same shared memory for the same ORACLE SID.
Solution Description:
1. Shutdown the standby database
2. Starting with Oracle Release 7.3.3:
add
_standby_lock_name_space= in the init.ora
of standby database
Starting with Oracle Release 8.0.X:
add lock_name_space= in the init.ora of standby database
where <name> is a name other than
the primary's database name, up to 8 characters long .
You can use a naming convention like:
If Primary db_name = DB1 set lock_name_space = DB1s
3. startup nomount standby database
4. alter database mount standby database.
Solution Explanation:
The above solution works for TESTING standby databases on the same
machine as the Primary Database.
|