ORA-12514 after rebooting server - oracle

I am using Oracle 10g R2.
Recently, after rebooting the server, I started having a problem where I couldn't connect to the instance. I am only connecting locally on the server itself.
Oddly enough, the issue corrects itself if I start the Database Administration Assistant, and select my instance to supposedly change its settings.
Does anybody have a clue on the roots of this problem?
#akaDruid: I am testing my connection simply by trying to start SQLPlus on the server.
#Matthew: It's Windows

EDIT: I don't think I read your question properly: The listener should not affect connections on the local machine, so you can probably ignore the rest of the answer, unless it gives you a hint! How were you testing your connection? Was ORA-12514 the only error?
(I'm assuming you're on Windows here)
I guess the listener is not starting automatically when you reboot the server, and it's getting starting in oracle administration assistant - I don't use that tool unfortunately so couldn't say.
Next time you reboot, before starting oracle administration assistant, open a command prompt and type lsnrctl status. If the listener has not yet started you will get something like this:
C:\Documents and Settings\user>lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 27-OCT-2008 14:00:21
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC01)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
32-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server.domain.co.uk)
(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
32-bit Windows Error: 61: Unknown error
C:\Documents and Settings\user>lsnrctl status
if it is running, you will get something like this:
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 27-OCT-2008 14:03
:33
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC01)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 27-OCT-2008 14:03:27
Uptime 0 days 0 hr. 0 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC01ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server.domain.co.uk)(PORT=1521))
)
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "ORCL1" has 1 instance(s).
Instance "ORCL1", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
C:\Documents and Settings\user>
If the listener is not starting, check that service is set to automatic. If it is, check the listener.ora makes sense, see what output you get from lsnrctl start, etc.
Hope that helps, or at least sends you down the right path

You haven't specified if this is windows or unix?
I've seen similar issues on unix when ORACLE_HOME was defined slightly differently on the account which starts up oracle, and on connecting accounts, one account had ORACLE_HOME=/usr/oracle , the other had ORACLE_HOME=/usr/oracle/ , the trailing slash messed things up.
How exactly are you staring up the server, do you have a script to do it, or are you connecting internally and issuing "startup"
again, if this is windows, I have no idea :)

I had the same error. Going to http://localhost:1158/em showed the listener was up, but the database instance was down.
Click the "Startup" button next to the instance to bring it back online (I think)

Another possible explanation:
http://www.orafaq.com/forum/t/66224/2/

Related

ORA-01034: ORACLE not available on remote connection

When I try to connect to Oracle database from the remote host (I use oracle instant client), I get following errors:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3640
Additional information: 1108778635
Process ID: 0
Session ID: 0 Serial number: 0
However, ORACLE_HOME on the host machine is set correctly, as well as ORACLE_SID, and i can easily connect to the database from its host machine:
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 10 09:20:09 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Last Successful login time: Wed Jul 10 2019 09:13:57 +03:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
What can cause this sort of behavior?
UPD:
Status of the listener on the remote DB:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.71.2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 05-JUL-2019 08:56:16
Uptime 6 days 23 hr. 29 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/12.1.0/dbhome_1/log/diag/tnslsnr/epyc-gbu2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.71.2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "AGRO.GBUBDD.RU" has 1 instance(s).
Instance "AGRO", status UNKNOWN, has 1 handler(s) for this service...
UPD2:
The command I use to connect to remote DB:
sqlplus /nolog
connect system/oracle#192.168.71.2:1521/agro.gbubdd.ru
This could happen due to 2 reasons.
1) Oracle database is not started correctly.
2) There is no space left and database is crashed / stopped working.
To correct, login to remote db and check if database is up or not and there is enough space for database to perform operations.
To check if database is open or not, on remote machine where db is installed, you can login with sql plus and run query to check status of database.
Having ORACLE_SID set in your environment is only relevant for local connections. The error is telling you that there is no database running with that SID on the machine you are running SQL*Plus on. It doesn't know about the remote DB.
To connect remotely you need to tell SQL*Plus how to reach the remote DB, which is usually either via a TNS entry or using 'easy connect' syntax.
You haven't included any details of the remote DB, but you would need to do something like:
sqlplus username#//database_host:listener_port/remote_service_name
Or start with sqlplus /nolog and then use the connect command, as shown in the documentation.
The port is usually 1521 but might be different, and the service name might be the same as the SID. If you run lsnrctl services or lsnrctl status on the DB server you should be able to see the valid service names, as well as the address and port the listener is using.

Startup nomount - oracle 10 centos linux

i got problem with starting up instance oracle 10.2.0.1 on Centos OS
im login on root
su - oracle
export $ORACLE_HOME
export $ORACLE_SID
login on sqlplus / as sysdba
{SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 13 08:09:23 2019
Connected to an idle instance.}
startup nomount
and have ORA
ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], []
i have created initXE.ora
lstrctl status:
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 13-MAY-2019 08:04:40
Uptime 0 days 0 hr. 15 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.29)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
initXE.ora:
DB_NAME=XE
DB_BLOCK_SIZE=8192
CONTROL_FILES=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/control1.ora
UNDO_TABLESPACE=undotbs
UNDO_MANAGEMENT=AUTO
SGA_TARGET=500M
PGA_AGGREGATE_TARGET=100M
LOG_BUFFER=5242880
DB_RECOVERY_FILE_DEST=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs
DB_RECOVERY_FILE_DEST_SIZE=2G
ADR_BASE=/wysheid/diag
ora-600 errors are internal errors. They usually tell you that you should contact the Oracle support (if you have an MOS account). On MOS you could lookup the error arguments, but this lookup not always returns a result. Without MOS access the situation could get less comfortable, since Oracle 10.2.0.1 is far beyond support.
But in the given case, you could be lucky, since http://amit7oracledba.blogspot.com/2013/07/ora-00600-internal-error-code-arguments.html claims that the error results from a mismatch in naming resolution and could be fixed with a change in /etc/hosts.

How to restart RDBMS’s listener in oracle 11g after installing Grid Infrastructure for a Standalone Server

I installed Grid Infrastructure for a standalone server and enabled ASM.So it has two listener.ora,one is
%oracle_base%\product\11.2.0\grid\NETWORK\ADMIN\listener.ora and
another is %oracle_home%\NETWORK\ADMIN\listener.ora.
I had defined a listener_dynamic in %oracle_home%\NETWORK\ADMIN\listener.ora.
My question is:when i stop RDBMS instance's listener,then restart it,it always says:TNS-01151:Missing listener name in LISTENER.ORA
Here is the output:
C:\Users\Administrator>set tns_admin=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
C:\Users\Administrator>lsnrctl status listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:30:24
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=WIN-P269HP3NG00)(PORT=2521)))
STATUS of the LISTENER
------------------------
Alias listener_dynamic
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 18-OCT-2017 11:53:27
Uptime 0 days 0 hr. 36 min. 57 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File d:\app\administrator\diag\tnslsnr\WIN-P269HP3NG00\listener_dynamic\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-P269HP3NG00)(PORT=2521)))
Services Summary...
Service "asset.xcsc.com" has 1 instance(s).
Instance "asset", status READY, has 1 handler(s) for this service...
Service "assetXDB.xcsc.com" has 1 instance(s).
Instance "asset", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\Users\Administrator>lsnrctl stop listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:31:08
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=WIN-P269HP3NG00)(PORT=2521)))
The command completed successfully
C:\Users\Administrator>lsnrctl start listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:31:26
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Starting tnslsnr: please wait...
Failed to open service <OracleOraCrs11g_home1TNSListenerlistener_dynamic>, error 1060.
TNSLSNR for 64-bitWindows: Version 11.2.0.1.0 -Production
system parameter file is D:\app\Administrator\product\11.2.0\grid\network\admin\listener.ora
Write to d:\app\administrator\product\11.2.0\grid\log\diag\tnslsnr\WIN-P269HP3NG00\listener_dynamic\alert\log.xml log information
TNS-01151:Missing listener name listener_dynamic in LISTENER.ORA
Listener failed to start. See the error message(s) above...
I have specified tns_admin,why each time dose it search listener.ora in grid directory?
When you install grid infrastructure you should manage your resources using SRVCTL.
Set your ORACLE_HOME to your grid infrastructure installation then:
srvctl start listener listner -l listener_dynamic
All your operations should be done through srvctl and not directly. If you didn't register your listener with your grid infrastructure you can do it with:
srvctl add listener -l listener_dynamic

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor while connecting as JDBC remote client

I have gone through all the suggestions given by many of you for this query. But unfortunately none of them has fixed my issue.
Problem:- I have installed Oracle12c into a our remote machine(Host1) and by default ORCL database has created and running. After that by using Database configuration Assistant I have created new database "YILIDB". I can connect to these databases from Host1 through sqldeveloper tool. But when I'm trying to access the above databases from another machine (Host2) I can't connect to it. First I tried by using JDBC code to connect to that data base. I got the below Exception.
Code:-
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:172.26.8.188:1521:YILIDB", "WM6",
"WM6");
Error:-
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:825)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:755)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:38)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:599)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at ConnectionTest.main(ConnectionTest.java:39)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:324)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:287)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1963)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:564)
... 6 more
And when I'm trying to connect from Host2 sqldeveloper to Host1 database I got below error which means basically I can't connect to remote database neither with JDBC code nor using sqldeveloper.
Error while I'm trying to connect from sqldeveloper:-
Status: Test-failed: IO error the network adapter could not establish the connection
And In the remote database machine I have verified services. Both ORCL and YILIDB services are running. I see only one listener in services up and running.
Can someone please provide me the solution for this.
Find the status of >lsnrctl status below
C:\Users\Administrator>lsnrctl status
LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 25-OCT-2016 14:14:41
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 12.1.0.1.0 - Production
Start Date 25-OCT-2016 14:04:56
Uptime 0 days 0 hr. 9 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service YILIDB
Listener Parameter File C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File C:\app\Administrator\diag\tnslsnr\SMYB2SW12-Yili\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.28.8.199)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
The problem has been fixed by changing the jdbc url with #.
Previously:
jdbc:oracle:thin:123.45.6.78:1521:YILIDB
Now:
jdbc:oracle:thin:#123.45.6.78:1521:YILIDB

How to obtain the list of Oracle's SIDs

I have the host, port, user id and password but missing SID for connecting to Oracle DBMS. How can I find the list of SIDs on that server?
A better way is, if you have access to the host machine and the Oracle install is to use the command: lsnrctl status. This works on both Unix, Linux, and Windows machines. The status command will show you all the listeners (and their associated SIDs).
C:\>lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-JUN-2009 16:16:34
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 13-JUN-2009 12:04:14
Uptime 2 days 4 hr. 12 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oracle\XE\app\oracle\product\10.2.0\server\network\admin\listener.ora
Listener Log File C:\oracle\XE\app\oracle\product\10.2.0\server\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ThinkpadT61)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
In the above example you can connect to the XE database using the Conect Strings XEXDB, XE_XPT or XE.
The short answer is that you need access to the host OS:
For Unix, ps -ef | grep pmon will show you one or more processes with names like ora_pmon_xxxx, and xxxx is the instance name.
In Windows I guess there is a similar signature in the task list.
In practice, this information is usually given to you by whoever administers the database when your connecting account is created.
The question comes down to : which ORACLE_SID's or services are supported by the listener that is running on host X port Y. Depending on how secure this listener is configured you can see this using the lsnrctl command from a client that has lsnrctl installed. To be able to do this you do need an oracle server installation on that client. When you have that you can issue
lsnrctl
set current_listener (description=(address=(host=X)(port=Y)(protocol=tcp)))
status
The default setting of the 10g listener fill cause the following result:
TNS-01189: The listener could not authenticate the user
This is because from 10g oracle default has
Security ON: Local OS Authentication
meaning that only the local OS user that started the listener can issue lsnrctl commands to the listener. The listener will refuse to answer any other user.
Another option to consider is the file /etc/oratab on Unix or its equivilent on Windows, which I think is a registry hive.
The oratab should list all SIDs on a host, whether currently running or not.
There is an nmap script that maybe could help, oracle-sid-brute:
http://nmap.org/nsedoc/scripts/oracle-sid-brute.html
It was installed with nmap on my system.
nmap --script oracle-sid-brute -p 1521-1560 [host]
This would only help if the SID can be matched in a list. The default list is here:
http://www.red-database-security.com/scripts/sid.txt

Resources