Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn standby database into primary 1

Status
Not open for further replies.

GERPAT

Programmer
Aug 15, 2002
30
IE
Does any one of you know what process I have to follow to take a standby database out of read only mode and make it the primary database.
 
The following was snipped from the Oracle 8i Standby Database Concepts and Administration Manual. It has lots of caveats and warnings and I would advise you look at this manual before going forward:


To activate a standby database:

Ensure that your standby database is mounted in EXCLUSIVE mode by executing the following query:

SQL> SELECT name,value FROM v$parameter WHERE name='parallel_server';
NAME VALUE
-----------------------------------------------------------------
parallel_server FALSE
1 row selected.

If the value is TRUE, then the database is not mounted exclusively; if the value is FALSE, then the database is mounted exclusively.

Activate the standby database:

SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;

Note that this command resets the online redo logs.

Shut down the standby instances:

SQL> SHUTDOWN IMMEDIATE

As soon as possible, back up your new production database. At this point, the former standby database is now your production database. This task, while not required, is a recommended safety measure because you cannot recover changes made after activation without a backup.

Start the new production instance in read/write or read-only mode:

SQL> STARTUP MOUNT
SQL> ALTER DATABASE READ ONLY; # opens the database in read-only mode
SQL> ALTER DATABASE READ WRITE; # opens the database in read/write mode

--------------------------------------------------------------------------------
Note:
After you activate the standby database, you lose all transactions from unarchived logs at your original production database. Because the standby redo logs are reset at activation, you cannot apply logs archived before activation.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top