Search This Blog

Total Pageviews

Sunday, 22 May 2016

Oracle Activate Physical Standby Database

Oracle Activate Physical Standby Database

On Primary ... 

alter system set log_archive_dest_state_2='defer' scope=both;

select name, open_mode, database_role from v$database;




On Standby ...

-bash-3.2$ . oraenv
ORACLE_SID = [prims] ?
The Oracle base remains unchanged with value /u01/app/oracle
-bash-3.2$ !sql
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat May 14 20:40:21 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount ;
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2256352 bytes
Variable Size             469762592 bytes
Database Buffers          205520896 bytes
Redo Buffers                3067904 bytes
Database mounted.


SQL> alter database activate standby database;

Database altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.

SQL> startup ;
ORACLE instance started.

Total System Global Area  680607744 bytes
Fixed Size                  2256352 bytes
Variable Size             469762592 bytes
Database Buffers          205520896 bytes
Redo Buffers                3067904 bytes
Database mounted.


Database opened.

SQL> select name, open_mode, database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
PRIM      READ WRITE           PRIMARY

SQL> def
DEFINE _DATE           = "14-MAY-16" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "prims" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1102000400" (CHAR)
DEFINE _EDITOR         = "/usr/bin/vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1102000400" (CHAR)


Now Database is open ...

SQL> select * from dual;

D
-
X

No comments:

Oracle DBA

anuj blog Archive