Search This Blog

Total Pageviews

Saturday, 31 December 2016

Oracle RAC Restrict Mode ...

Oracle RAC  Restrict Mode ...


Oracle Database restricted mode 

[oracle@mrac2 ~]$
[oracle@mrac2 ~]$ srvctl status database -d mrac
Instance mrac1 is running on node mrac1
Instance mrac2 is running on node mrac2

[oracle@mrac2 ~]$ srvctl status database -d mrac -v
Instance mrac1 is running on node mrac1. Instance status: Open.
Instance mrac2 is running on node mrac2. Instance status: Open.

[oracle@mrac2 ~]$ srvctl stop database -d mrac


[oracle@mrac1 ~]$ srvctl status database -d mrac  -v
Instance mrac1 is not running on node mrac1
Instance mrac2 is not running on node mrac2



[oracle@mrac2 ~]$ srvctl start database -d mrac -o restrict

[oracle@mrac2 ~]$
[oracle@mrac2 ~]$ srvctl status database -d mrac -v
Instance mrac1 is running on node mrac1. Instance status: Restricted Access.
Instance mrac2 is running on node mrac2. Instance status: Restricted Access.


set head off verify off echo off pages 150 linesize 120 feedback off
alter session set nls_date_format='DD-MM-YYYY HH24:MI:SS';
select distinct
'DATABASE_NAME..............................................: '|| NAME             ,
'INSTANCE NAME..............................................: '|| INSTANCE_NAME    ,
'LOG_MODE...................................................: '|| LOG_MODE         ,
'OPEN MODE..................................................: '|| OPEN_MODE        ,
'INSTANCE_NAME..............................................: '|| INSTANCE_NAME    ,
'HOSTNAME...................................................: '|| HOST_NAME        ,
'STATUS.....................................................: '|| STATUS           ,
'LOGINS.....................................................: '|| LOGINS           ,
'STARTUP-TIME...............................................: '|| STARTUP_TIME     ,
'DATAGUARD BROKER...........................................: '|| DATAGUARD_BROKER ,
'GUARD STATUS...............................................: '|| GUARD_STATUS     ,
'FLASHBACK ON...............................................: '|| FLASHBACK_ON     ,
'PROTECTION MODE............................................: '|| PROTECTION_MODE  ,
'CONTROLFILE TYPE...........................................: '|| CONTROLFILE_TYPE
from gv$instance i, v$database d
-- where 1=1  
-- and i.inst_id=d.inst_id
order by 2;
set head on verify on echo on feedback on


DATABASE_NAME..............................................: MRAC
INSTANCE NAME..............................................: mrac1
LOG_MODE...................................................: NOARCHIVELOG
OPEN MODE..................................................: READ WRITE
INSTANCE_NAME..............................................: mrac1
HOSTNAME...................................................: mrac1.localdomain
STATUS.....................................................: OPEN
LOGINS.....................................................: RESTRICTED
STARTUP-TIME...............................................: 31-12-2016 11:07:26
DATAGUARD BROKER...........................................: DISABLED
GUARD STATUS...............................................: NONE
FLASHBACK ON...............................................: NO
PROTECTION MODE............................................: MAXIMUM PERFORMANCE
CONTROLFILE TYPE...........................................: CURRENT

DATABASE_NAME..............................................: MRAC
INSTANCE NAME..............................................: mrac2
LOG_MODE...................................................: NOARCHIVELOG
OPEN MODE..................................................: READ WRITE
INSTANCE_NAME..............................................: mrac2
HOSTNAME...................................................: mrac2.localdomain
STATUS.....................................................: STARTED
LOGINS.....................................................: ALLOWED
STARTUP-TIME...............................................: 31-12-2016 12:01:27
DATAGUARD BROKER...........................................: DISABLED
GUARD STATUS...............................................: NONE
FLASHBACK ON...............................................: NO
PROTECTION MODE............................................: MAXIMUM PERFORMANCE
CONTROLFILE TYPE...........................................: CURRENT


set linesize 200
col HOST_NAME for a30
SQL> SQL> col STATUS for a20
SQL> SQL> select instance_name, host_name, archiver, thread#, decode(STATUS,'STARTED','STARTUP***NOMOUNT',status) status,LOGINS, STARTUP_TIME from gv$instance ;



No comments:

Oracle DBA

anuj blog Archive