Ora 12528 ошибка как исправить

Tried to connect a NOMOUNT database, but it failed with ORA-12528.

C:\Users\ed>sqlplus sys/password@orcl as sysdba
...
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

ORA-12528 means that the database is at NOMOUNT state, there’s no way to connect to a NOMOUNT database for normal users at client side. On the other side, there’s a way that can allow SYS to connect to a NOMOUNT database externally.

In such moment, the connection to the service of database is BLOCKED in the listener, which means, normal connections will be rejected. For example:

SQL> conn hr/hr@orcl
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

Let’s check the service status of database in listener.

[oracle@test ~]$ lsnrctl status
...
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully

Solution

For normal users who want to connect to the database, you have to open the database to able them to access. For connections by SYS, the solution is to add a special parameter UR=A in connect descriptor to lift off the restriction. More specifically, we added (UR=A) for a connect identifier ORCL.

[oracle@test ~]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
...
ORCL =
    (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = standby01)(PORT = 1521))
        (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = ORCL)(UR=A)
        )
    )

Let’s see how we connect the NOMOUNT database.

C:\Users\ed>sqlplus sys/password@ORCL as sysdba
...
Connected.

We solved it.

For connecting idle, nomount or restricted database externally, you need some skills to do it.

I am getting this error when I try to connect to my database:

ora-12528: TNS:Listener: All Appropriate instances are blocking new connections

I tried the following, with no success:

  1. Stop and Start the Listener.
  2. Shutdown and Startup database.
  3. Restart the oracle services.

How might I resolve this?

Michael Petrotta's user avatar

asked Apr 3, 2012 at 4:37

Geet's user avatar

You might have a problem with either the network and/or the archive logs — the above usually happens when the area/disk where the archive logs are stored is full, Oracle then just refuses new connections.

Another possibility is that you maxed out the number of allowed connections — this should usually be warning sign that you might have an application which leaks connections.

If you are 100% sure that you are not leaking connections then you could configure Oracle to accept more connections (BEWARE of licensing, RAM etc.!).

Sathyajith Bhat's user avatar

answered Apr 3, 2012 at 4:42

Yahia's user avatar

YahiaYahia

69.7k9 gold badges115 silver badges144 bronze badges

1

I’m getting this error if i try to login as db user. If lsnrctl status is run i get the below error.
DB was working fine all these years and stopped working suddenly.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ABC.LOCAL)(PORT=1521)
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                19-MAY-2014 12:18:17
Uptime                    0 days 0 hr. 22 min. 51 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\Oracle\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         d:\oracle\administrator\diag\tnslsnr\abc\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ABC.LOCAL)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "devdb" has 1 instance(s).
  Instance "devdb", status BLOCKED, has 1 handler(s) for this service...
Service "testdb" has 1 instance(s).
  Instance "testdb", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully

Maheswaran Ravisankar's user avatar

asked May 19, 2014 at 17:39

Shashi's user avatar

1

set ORACLE_SID=<YOUR_SID>
sqlplus "/as sysdba"
alter system disable restricted session;

or maybe

shutdown abort;

or maybe

lsnrctl stop

lsnrctl start

answered May 19, 2014 at 18:12

Randy's user avatar

RandyRandy

16.5k1 gold badge37 silver badges55 bronze badges

2

You have to know if the problem come from the listener or from the database.

  • So first, restart the listener, it could solve the problem.

  • Second, it could come from the db if it’s not in open mode (nomount, mount, restrict). To check it, connect locally and do the following query:

    sqlplus /nolog

    connect / as sysdba

    SQL> select instance_name, status, database_status from v$instance;

answered May 19, 2014 at 18:14

eliatou's user avatar

eliatoueliatou

7445 silver badges12 bronze badges

5

I had this error message with boot2docker on windows with the docker-oracle-xe-11g image (https://registry.hub.docker.com/u/wnameless/oracle-xe-11g/).

The reason was that the virtual box disk was full (check with boot2docker.exe ssh df). Deleting old images and restarting the container solved the problem.

answered May 21, 2015 at 12:56

leo's user avatar

leoleo

3,6777 gold badges34 silver badges46 bronze badges

I had this problem on my developent environment with Visual Studio.

What helped me was to Clean Solution in Visual Studio and then do a rebuild.

answered Mar 2, 2016 at 11:27

Martin Staufcik's user avatar

Martin StaufcikMartin Staufcik

8,3574 gold badges44 silver badges64 bronze badges

0

If you are using 11G XE with Windows, along with tns listener restart, make sure Windows Event Log service is started.

answered Oct 6, 2014 at 4:39

Chandan C's user avatar

Chandan CChandan C

1381 silver badge11 bronze badges

I tried restarting my computer and that fixed it for me.

answered Feb 19, 2022 at 22:19

scvblwxq's user avatar

February 26, 2019
ORACLE

When trying to connect to an open intance via the listener, you may receive the error “ORA-12528: TNS: listener: all appropriate instances are blocking new connections”. The current instance is in RESTRICTED or NOMOUNT mode. In this case, you need to add the line (UR = A) to the corresponding tns record in the tnsnames.ora file.

When connected with Rman, an error will be received as follows.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections

The same error is also seen when connected with Sqlplus.

ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

In this case, the corresponding TNS record in the tnsnames.ora file under the corresponding $ ORACLE_HOME/network/admin directory should be similar to the following.

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ORCL)

      (UR = A)

    )

  )

Then, you can connect successfully.

Loading

In this case, we are getting the following error when our database is start in mount / nomount / restricted state. Sometime we faced this while configuring the dataguard Environment.

Error:

C:\Windows\system32>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 – Production on Wed Oct 1 19:40:51 2008
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

 
SQL> connect sys@dbname as sysdba
Enter password:
ERROR: ORA-12528: TNS:listener: all appropriate instances are blocking new connection


You might get this error if you encounter with Connections via the listener to an instance that is in RESTRICTED status or in NO MOUNT status. The lsnrctl services output will show that the service handler for this instance is in state: BLOCKED or RESTRICTED.

 
Check the status of services by listener commands:

lsnrctl status
lsnrctl services

As example show below the status is blocked for ORCL service:

lsnrctl status
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for windows: Version 11.2.0.1.0 - Production
Start Date                20-DEC-2014 02:39:22
Uptime                    14 days 2 hr. 26 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File D:\oracle\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File D:\oracle\diag\tnslsnr\test\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status BLOCKED, has 1 handler(s) for this service...


Solution

For Standalone database
1. Restart the Oracle services.(first step will fixed issue)

SQLPLUS / as sysdba
-- Shutdown the DB Server
Shutdown immediate
-- Start the DB server
Startup

2. Check the listener is working on Dynamic registration for the Service. If you are again and again getting this error. You can need to make manual entry of SID in listener.ora file or add with help of NETCA utility.
Entry as shown in bold: (SID_DESC= (GLOBAL_DBNAME=ORCL ….

Listener.ora file:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\oracle\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
 (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = D:\oracle\12.1.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    )

If its a Dataguard Environment or you used Auxiliary channel for RMAN
In Some cases we need to overcome with this problem like dataguard configuration. In which our standby database is in recover mode means it’s in mounted state for apply the redo logs of primary database. In that case listener status for service is Blocked or RESTRICTED. To overcome from it we used the following parameter in tnsnames.ora file:

 
(UR=A) clause is used for TNS connect strings has been created as an enhancement.*(UR=A)* clause is intended to work with a dynamically registered handler so the use of SERVICE_NAME versus SID is preferred. (ID 362656.1)

Need to modify the tnsnames.ora file for connectivity as shown below:

DBNAME =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xx.xx)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = hostname.rnhub.com)
            (UR = A)
    )
  )

Понравилась статья? Поделить с друзьями:
  • Opel vectra c z18xer ошибка 0014
  • Opel vectra b ошибка brake pad
  • Opel vectra b ошибка 1405
  • Opel omega b как сбросить ошибки
  • Opel mokka ошибка code 89