Showing posts with label Oracle Database restricted mode. Show all posts
Showing posts with label Oracle Database restricted mode. Show all posts

Thursday 18 December 2014

ORA-12526: TNS:listener: all appropriate instances are in restricted mode

Scenario: When try to connect Database using tns name getting the following error

C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on Thu Dec 18 19:02:17 2014

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Enter user-name: cib/cciibb@
ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode

Reason: You are trying to connect to a database that has been started in restricted mode.

When a database is put in restricted mode for maintenance operations only users with the RESTRICTED SESSION privilege can connect to it (SYSDBAs and SYSOPERs) and only by using a local database connection.


Solution: 

connect Database as sysdba and execute the following command

C:\Users\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 18 19:20:11 2014

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

Enter user-name: /as sysdba

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>ALTER SYSTEM DISABLE RESTRICTED SESSION;

Now try to connect using tnsnames