Tabs

Wednesday, January 14, 2015

Startup Database At Restricted Mode.

We can start the database in restricted mode. Restricted mode will only allow users with special privileges to access the database (typically DBA’s), even though the database is technically open. 
We use the startup restrict command to open the database in restricted mode as seen in this example.

 DB INSTACNE STATUS:- 




INSTANCE_NAME HOST_NAME STARTUP_T STATUS ARCHIVE INSTANCE_ROLE    DATABASE_STATUS LOGINS
------------- --------- --------- ------ ------- ---------------- --------------- --------

ORCL          ORCL      23-DEC-14 OPEN   STARTED PRIMARY_INSTANCE ACTIVE             ALLOWED

Enable the restricted mode- Method 1-
 
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


SQL> startup restrict;
ORACLE instance started.

Total System Global Area 1686925312 bytes
Fixed Size                  2176368 bytes
Variable Size            1090521744 bytes
Database Buffers          587202560 bytes
Redo Buffers                7024640 bytes
Database mounted.
Database opened.
SQL>
SQL> select instance_name,host_name,startup_time,status,archiver,instance_role,database_status,logins from v$instance;


INSTANCE_NAME HOST_NAME STARTUP_T STATUS ARCHIVE INSTANCE_ROLE    DATABASE_STATUS LOGINS
------------- --------- --------- ------ ------- ---------------- --------------- -------------
ORCL          ORCL      24-DEC-14 OPEN   STARTED PRIMARY_INSTANCE ACTIVE             RESTRICTED


 

Disable the restricted mode - Method-1-
 
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


SQL> startup
ORACLE instance started.

Total System Global Area 1686925312 bytes
Fixed Size                  2176368 bytes
Variable Size            1090521744 bytes
Database Buffers          587202560 bytes
Redo Buffers                7024640 bytes
Database mounted.
Database opened.
SQL>
SQL> select instance_name,host_name,startup_time,status,archiver,instance_role,database_status,logins from v$instance;









INSTANCE_NAME HOST_NAME STARTUP_T STATUS ARCHIVE INSTANCE_ROLE    DATABASE_STATUS LOGINS
------------- --------- --------- ------ ------- ---------------- --------------- --------------
ORCL          ORCL      24-DEC-14 OPEN   STARTED PRIMARY_INSTANCE ACTIVE              ALLOWED



Enable the restricted mode - Method 2-
 
SQL> alter system enable restricted session;

System altered.

SQL> select instance_name,host_name,startup_time,status,archiver,instance_role,database_status,logins from v$instance;



INSTANCE_NAME HOST_NAME STARTUP_T STATUS ARCHIVE INSTANCE_ROLE    DATABASE_STATUS LOGINS
------------- --------- --------- ------ ------- ---------------- --------------- ------------
ORCL          ORCL      24-DEC-14 OPEN   STARTED PRIMARY_INSTANCE ACTIVE              RESTRICTED

 
Disable the restricted mode- Method 2- 
 
SQL> alter system disable restricted session;

System altered.

SQL> select instance_name,host_name,startup_time,status,archiver,instance_role,database_status,logins from v$instance;

 



INSTANCE_NAME HOST_NAME STARTUP_T STATUS ARCHIVE INSTANCE_ROLE    DATABASE_STATUS LOGINS
------------- --------- --------- ------ ------- ---------------- --------------- --------------
ORCL          ORCL      24-DEC-14 OPEN   STARTED PRIMARY_INSTANCE ACTIVE                 ALLOWED

 

No comments:

Post a Comment

Thank you for your Suggestions...