error: ORA-12505
java.sql.SQLException: listener refused the connection with the following error:ORA-12505, TNS:listener is not currently of SID given in connect descriptor
Used by the client connect descriptor was:
* 127.0.0.1:1521:XE *.
My Java Code:
import java.io.*;
import java.sql.*;
public class db{
public static Connection getOracleConnection() throws Exception {
String driver = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc:oracle:thin:@127.0.0.1:1521:XE";
String username = "login";
String password = "*****";
Class.forName(driver);
Connection cnn = DriverManager.getConnection(url, username, password);
return cnn;
}
}
My Listener.ora:# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
My tnsnames.ora# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
-bash-3, 1 # hostname100
My/etc/hosts
127.0.0.1 100 localhost localhost.localdomain
My sysconfigNETWORKING="yes"
GATEWAY="67.19.xx.xx"
HOSTNAME="100"
My status of the listener:-bash-3.1# lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-MAR-2009 05:44:49
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 Linux: Version 10.2.0.1.0 - Production
Start Date 11-MAR-2009 05:39:58
Uptime 0 days 0 hr. 4 min. 51 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)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
My listener services:-bash-3.1# lsnrctl service
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-MAR-2009 05:45:41
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
Thank you and best regards
Hello!
Your "lsnrctl status" tells you that the listener unaware of XE services. Try the following steps:
(1.) to connect to SQL * Plus as SYSDBA enter
ALTER SYSTEM REGISTER;
(2.) to check if your listener knows XE after that
If this does not work, try:
1.) modify your listener.ora like that
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME=XE)
(SID_NAME=XE)
(ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
Recharge 2.) the listenerparameters
lsnrctl reload
3.) again once check your status as a listener and try to connect from your Java application.
Yours sincerely
Florian W.
Tags: Database
Similar Questions
-
Hello guys, I know this question has been posted on several occasions in the past, but my question includes developer oracle sql only. I can use the database and all the features through sql * more even execute sql queries. but when it comes to developer sql always returns this error. (error: ORA-12505.)
Windows 8-64 oracle 11 g r2
--------------------------------------------------------------------------------------------------------------------------------------
Welcome to LSNRCTL, enter 'help' for more information.
LSNRCTL > status
Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))
STATUS of the LISTENER
------------------------
Alias auditeur1
TNSLSNR for Windows 64-bit version: Version 11.2.0.1.0 - Production
Start date August 11, 2014 13:08:08
Uptime 0 days 0 h 14 min 55 sec
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Listener parameter File C:\app\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
C:\app\oracle\diag\tnslsnr\Needo-pc\listener1\alert\log.XML log listener
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = Needo-pc)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Summary of services...
Service 'CLRExtProc' has 1 instance (s).
Instance of 'CLRExtProc', status UNKNOWN, has 3 service management...
Service "orcl" has 1 instance (s).
Instance "orcl", State LOAN, has 1 operation for this service...
Service 'orclXDB' has 1 instance (s).
Instance "orcl", State LOAN, has 1 operation for this service...
The command completed successfully
-----------------------------------------------------------------------------------------------------------------
LSNRCTL > services
Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))
Summary of services...
Service 'CLRExtProc' has 1 instance (s).
Instance of 'CLRExtProc', status UNKNOWN, has 3 service management...
Managers:
"DEDICATED" set up: 0 denied: 0
LOCAL SERVER
"ORACLE SERVER" put in place: 0 denied: current: 0 0 max: 25 status: ready
CLRExtProc
(ADDRESS = (PROTOCOL = ipc) (PIPENAME=\\.\pipe\NTN_122C_C6D0FCF3. ORA))
"ORACLE SERVER" put in place: 0 denied: current: 0 0 max: 25 status: ready
CLRExtProc
(ADDRESS = (PROTOCOL = ipc) (PIPENAME=\\.\pipe\NTN_122C_C6D0FCF3. ORA))
Service "orcl" has 1 instance (s).
Instance "orcl", State LOAN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 22 refused: 0 status: ready
LOCAL SERVER
Service 'orclXDB' has 1 instance (s).
Instance "orcl", State LOAN, has 1 operation for this service...
Managers:
"D000" put in place: 0 denied: current: 0 0 max: 1022 State: loan
DISPATCHER < machine: NEEDO-PC, pid: 3172 >
(ADDRESS = (PROTOCOL = tcp) (HOST = Needo-pc)(PORT=52654))
The command completed successfully
------------------------------------------------------------------------------------------
Thank you!
Try it with sid ORCL instead of XE.
If this does not help, then choose SERVICE_NAME orcl instead of SID in sql developer.
Your listener seems to have an entry for this.
You can also test it in SQl * more. But what you've done so far in SQl * plus was a "server connection", without providing the database.
Because in your case, the client and the server is on the same machine, it works with sql * more.
If you try a customer coonnect by specifying the database, then you would do the same thing as the Oracle SQL Developer is by train.
For test purposes, something like
sqlplus user/pwd@host:port/ORCL
also in the Sqlnet.ora file must be an etry for local EZCONNECT connect method. I don't know if it is set during the installation of network by default.
You can try if there is an Alias-TNS name (configured in the tnsnames.ora)
sqlplus user/pwd@ORCL
If it works with sql * plus, so you must always indicate the sql developer where the tnsnames.ora file is located on your computer.
The setting can be found in the menu: extras/tools/base data/improved
The tnsnames.ora file is usually in a file like this:
C:\Oracle\product\11.2.0\client_1\network\admin
-
Error ORA-12505 only in SQL Developer - 11g Express
Hello
I found many similar problems but no answering mine.
I installed the Oracle 11g Express version. I can connect to my database order online when I try Developer SQL I get the following error code:
Status: Failure-Test failed: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor.
i\m data trying to connect to is xe.
Here are my tnsnames.ora file content:
===============================================================================================
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Jon-portable)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
===================================================================================================
Here is the output of "tnsping xe:
Use settings files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
TNSNAMES adapter used to resolve the alias
Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = Jon-Lapt
OP) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
==================================================================================================
The production of SERVICES of LSNRTCL are:
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1)))
Summary of services...
Service 'CLRExtProc' has 1 instance (s).
Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 0 denied: 0
LOCAL SERVER
Service 'PLSExtProc' has 1 instance (s).
Instance of 'PLSExtProc', status UNKNOWN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 0 denied: 0
LOCAL SERVER
Service 'XEXDB' has 1 instance (s).
Instance "xe", State LOAN, has 1 operation for this service...
Managers:
"D000" put in place: 0 denied: current: 0 0 max: 1022 State: loan
DISPATCHER < machine: JON-laptop, pid: 2636 >
(ADDRESS = (PROTOCOL = tcp) (HOST = Jon-Laptop)(PORT=1064))
"Xe" service has 1 instance (s).
Instance "xe", State LOAN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 0 denied: 0 status: ready
LOCAL SERVER
The command completed successfully
=================================================================================================
NOTE: I tried to connect to ORCL with SQL Developer and put with the SYSTEM account.
Please let me know if you need more information. Thanks in advance.
you typed in the 'OracleServiceXE' chain & the listener isn't aware of any Service with this exact name.
You must only enter "XE".
-
Listener to refuse the connection with the following error ORA-12505
Hi everyone, Am really new to the oracle database, I work on my school project work and am stuck in the middle of this error (listener refused the connection with the following error ORA-12505).
I started the time serveral listener and it is said that 'no service supported by the LISTENER', I can't access the database via sqldeveloper including trows on the same error (listener refused the connection with the following error ORA-12505, TNS:Listener currently know of SID given in connect descriptor.) In addition, my em show red arrow down to the listener. Here are my coordinates hard & software.
Oracle 11.1.0
OS: Red Hat Enterprise Linux 4 (running the operating system through Vmware workstation)
TNSNAME. ORA
LISTENER2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
((ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST=localhost.localdomain))
)
)
AUDITEUR1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1523))
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
Listner, ora
LISTNER_ORCL
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
)
IMT_ADMI =
(= DESRIPTION
(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST=localhost.localdomain))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = imt_admin
)
)
LISTENER_IMTADMIN =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST=localhost.localdomain))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
I read on some forums that I need to edit somethings that am not sure cos I don't want to mess with the database, I need help on what to.
Thanks for the help in advance.(ADDRESS = (PROTOCOL = TCP)(HOST=localhost.localdomain) (PORT = 1521))
Try to edit listener.ora by:
(ADDRESS = (PROTOCOL = TCP) (HOST = HOST_NAME_OF_YOUR_DATABASE_MACHINE/OR TRY USING THE IP ADDRESS OF THE DATABASE SERVER MACHINE)(PORT=1521))
Just try to edit HOST = value line above. You must use HOST_NAME_OF_YOUR_DATABASE_MACHINE or IP OF the DATABASE SERVER MACHINE.Host name can be obtained by the hostname command on the database server.
With localhost, no one can connect to the database remotely.
Concerning
Girish SharmaPublished by: Girish Sharma January 11, 2013 18:26
then after the output of commands below:
lsnrctl stop
lsnrctl start
Wait 60 seconds...
ORACLE_SID =
sqlplus scott/tiger@tnsnameShow us what is happening now.
-
Listener refused the connection with the following error: ORA-12505
Hello
Windows XP + Oracle 10.1.0.20Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: 127.0.0.1:1521:XE
I checked my *.ora files and found the host 127.0.0.1 but I noticed by running the netstat command on prompt back most of my ports is captured by www.360.cn including 1521
When I try to stop the following message is displayed:
Thank you and best regardsORA-01034: ORACLE not available ORA-27101: shared memory realm does not exists
Hello
[oracle@myoramachine ~]$ oerr ora 12505 12505, 00000, "TNS:listener does not currently know of SID given in connect descriptor" // *Cause: The listener received a request to establish a connection to a // database or other service. The connect descriptor received by the listener // specified a SID for an instance (usually a database instance) that either // has not yet dynamically registered with the listener or has not been // statically configured for the listener. This may be a temporary condition // such as after the listener has started, but before the database instance // has registered with the listener. // *Action: // - Wait a moment and try to connect a second time. // - Check which instances are currently known by the listener by executing: // lsnrctl services
// - Check that the SID parameter in the connect descriptor specifies // an instance known by the listener. // - Check for an event in the listener.log file. [oracle@myoramachine ~]$ 1. check the lsnrctl services
2 check the tnsping output:
tnsping MYORACLE
3. check the connectivity to the computer hosting your Oracle server to the port (I guess 1521):
Telnet
1521 4. in case you are not able to connect to the Oracle Server - I investigate it in several directions:
-problem of network infrastructure
-some process disturbing / virus on the server Oracle itself
-firewall problem
Good luck!
---------------------------------
http://DBA-star.blogspot.com/ -
Database 8 had error ORA-12505 wit DBLINK to 10 g
Hello
I have a database of Oracle 8 Linux, I want to create a data link to an Oracle 10 g database, I wrote tnsnames entry ian like this
OSO.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SID = OSOL.com)
)
)
I also tried with this
OSO.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = OSO.com)
)
)
AND thereby
OSO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SID = OSOL.com)
)
)
and when I tried to conect to sqlplus give me ORA-12505: TNS:listener could not resolve SID in connect descriptor, I try OSO tnsping works very well but don't sqlplus
Can U help me
Thank youhosoriol wrote:
Hello
I have a database of Oracle 8 Linux, I want to create a data link to an Oracle 10 g database, I wrote tnsnames entry ian like this
OSO.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SID = OSOL.com)
)
)I also tried with this
OSO.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = OSO.com)
)
)AND thereby
OSO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST= 172.1.34.120) (PORT = 1521))
(CONNECT_DATA =
(SID = OSOL.com)
)
)
and when I tried to conect to sqlplus give me ORA-12505: TNS:listener could not resolve SID in connect descriptor, I try OSO tnsping works very well but don't sqlplus
Can U help me
Thank youTNSPING only shows that there is a listener on the specified host and port. He really doesn't know the status of any particular database.
What services are you see when you do a LSNRCTL STATUS on the machine to 172.1.34.120. That's what you have to choose when setting SERVICE_NAME in your tnsnames.ora file.
BTW, sid has really nothing to do with the areas, so specifying SID = OSOL.com was particularly striking to glitter! ;-)
-
Hello
I was trying to set up a database connection in Oracle developer j 12 c.
It's showing this exception.
I m in this news. Could someone help me pls to solve this issue.
I have attached the screen for reference.
https://www.dropbox.com/SC/ua5a92q6kwwflui/wiuCXO_gaG
Thank you
Lax
Database, you are trying to connect is ORCL? If Yes, then you suggest that you write ORCL in the dialog box where you are supposed to write the instance that is directed by the attachment instead of XE what we ORCL
-
Hello
When I try to connect to the hr schema in SQL Developer with these credentials (host: localhost, port: 1521, SID: ORCL), it throws the error message.
"" Status: failed - Test has failed: listener refused the connection with the following error: ORA-12505, TNS: listener does not currently know the SID ".
When I try to connect through cmd, it throws this
SQL * more: Production version 11.2.0.1.0 Mon Jan 11 17:09:47 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: human resources
Enter the password:
ERROR:
ORA-01033: ORACLE initialization or shutting
Process ID: 0
Session IDs: serial number 0: 0
And here is the status of the listener
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production January 11, 2016 16:04
: 28
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
TNSLSNR for Windows 64-bit version: Version 11.2.0.1.0 - Prod
ction
Start date January 11, 2016 15:02:27
Uptime 0 days 1 hour 2 minutes 5 seconds
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Listener parameter File D:\app\DKMOH\product\11.2.0\dbhome_1\network\admin\l
istener.ora
D:\app\dkmoh\diag\tnslsnr\DKMOH-PC\listener\alert\ log listener
log. XML
Summary of endpoints listening...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))
Summary of services...
Service 'CLRExtProc' has 1 instance (s).
Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
The command completed successfully
I went through this link fixed - ORA-01033: ORACLE initialization or shutdown in progress | IT Blogger Tips , where it says to change the status from the db to 'OPEN'.
SQL > select status, database_status from v$ instance;
STATUS DATABASE_STATUS
------------ -----------------
ACTIVE RISE
And then, when I run this query below, that's what I get.
SQL > alter database open;
change the database open
*
ERROR on line 1:
ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1],
[[507], [56509], [56515] [] [], [], [], [], []]
I'm totally lost here. Any help would be appreciated.
Thank you
Hello
This issue seems to be with the redo log.
SQL > bootable media.
SQL > show parameter control_files
Query 1
------------
SQL > select a.member, a.group #, b.status v$ logfile a, v$ log b where a.group #= b.group # and b.status = 'CURRENT';
Note the name of the redo log
SQL > the judgment;
Take a backup of the controlfile operating system level (this is to ensure that we have a copy backup of the current state of the controlfile)
SQL > bootable media.
SQL > restore database using backup controlfile until cancel;
Enter the location of the log to roll forward as recent on demand 1 when you are prompted for the recovery of
Press enter
SQL > Alter database open resetlogs;
Thank you
-
ORA-12505 error after installation listener properly and tnsnames.
Hello.
I have a very common problem. I can't connect using the tnsnames on Windows 2003 server.
Facts.
1 Tnsnames.ora file is set correctly.
2 Listener.ora file is set correctly.
3 - tnsping works without any problem.
4 - Windows service is running.
However, I get this error.
C:\Documents and Settings\sabreadm > sqlplus lps/first1@lm3dprd1
SQL * more: Release 10.2.0.1.0 - Production on Wednesday 24 June at 12:32:26 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12505: TNS:listener is not currently of SID given in connect
descriptor of
Enter the user name:
ERROR:
ORA-01017: name of user and password invalid. connection refused
content of the Listener.ora file
-------------------------------
listener.ora # Network Configuration file: D:\Apps\oracle\network\admin\listener.ora
# Generated by Oracle configuration tools.
TRACE_LEVEL_LISTENER = USER
TRACE_DIRECTORY_LISTENER = D:\Apps\oracle\NETWORK\ADMIN
LOG_FILE_LISTENER = listener.log
LOG_DIRECTORY_LISTENER = D:\Apps\oracle\NETWORK\ADMIN
TRACE_FILE_LISTENER = listener.trc
MAX_REG_CONNECTIONS_LISTENER = 3000
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.58.44)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = lm3dtst1)
(ORACLE_HOME = D:\Apps\oracle)
)
(SID_DESC =
(SID_NAME = lm3dprd1)
(ORACLE_HOME = D:\Apps\oracle)
)
)
content of the tnsnames.ora file.
-----------------------------------
tnsnames.ora # Network Configuration file: D:\Apps\oracle\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
lm3dtst1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = 192.168.58.44)
(Port = 1521)
)
)
(CONNECT_DATA =
(SID = lm3dtst1
(GLOBAL_NAME = lm3dtst1)
)
)
lm3dprd1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = 192.168.58.44)
(Port = 1521)
)
)
(CONNECT_DATA =
(SID = lm3dprd1
(GLOBAL_NAME = lm3dprd1)
)
)
Any advice will be highly appreciated.
Thank you.
Alex.Alex,
Next time when you post code or output or no matter what configuration, place them between.
tags to preserve formatting \
Your code or output
\
h4. Anyway, modify your tnsnames.ora file on your client machine and add this
lm3dprd1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.58.44)(PORT = 1521))
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME = lm3dprd1)
(INSTANCE_NAME = lm3dprd1)
)
)Regards OrionNet
-
A localhost DB connection works, other gets ORA - 12505 connecting to the DB in Pentaho
Hello
I use LOCALHOST to connect to my database of dev and have no problem connection using JDBC in Pentaho. When I try to connect to my database of prod, he throws "listener refused the connection with the following error: ORA - 12505, TNS:listener is not currently of SID given in connect descriptor". Both are 11 G databases and I can't TNSPING both of them and I can connect at once using SQL Developer.
Here are my LISTENER and TNSNAMES entries:
DEV (working properly):
FTSDEV =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = localhost)
(PORT = 1531)
)
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME = FTSDEV)
)
)
PROD (does not work):
FTSPRD =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = on)
(FAILOVER = off)
(ADDRESS = (PROTOCOL = TCP (PORT = 1528))(HOST=localhost))
)
(CONNECT_DATA = (SERVICE_NAME = FTSPRD_ETL))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Oracle\product\11.2.0\dbhome_1)
(= Extproc PROGRAM)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
)
)
C:\Users\ > lsnrctl services
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 6 may 2015 10:39
: 35
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)))
Summary of services...
Service 'CLRExtProc' has 1 instance (s).
Instance of 'CLRExtProc', status UNKNOWN, has 1 operation for this service...
Managers:
"DEDICATED" set up: 0 denied: 0
LOCAL SERVER
The command completed successfully
Thanks in advance for your help
Well, it sounds like a question for Pentaho.
However, if you have Oracle installed on the Pentaho Server customer, you could use OIC as the access method and then provide the TNS alias.
In the contrary case, it * seems * that Pentaho for a JDBC connection, use your 'database name' as a SID. What is the result of lsnrctl and status services on your box of production Oracle lsnrctl?
-
ORA-12505, TNS:listener is not currently of SID given in connect the
Hi, I have a problem connecting to the repository working ODI...
The master repository and repository of work are installed in the Oracle 11g company Manager...
From my PC, I can connect to the master repository and I can see the repository to work, but when I try to connect I get this message:
oracle.odi.core.config.WorkRepositoryResourceFailureException: ODI-10182: categorizar sin Excepcion durante el acceso al repositorio.
Could not make JDBC connection; nested exception is java.sql.SQLException: Se ha powered una excepcion al get the conexion: oracle.ucp.UniversalConnectionPoolException: No. is you can get the conexion del origen of datos: java.sql.SQLException: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor
at oracle.odi.core.repository.Repository.getWorkRepository(Repository.java:195)
at oracle.odi.core.OdiInstance.createWorkRepository(OdiInstance.java:504)
to oracle.odi.core.OdiInstance. < init > (OdiInstance.java:581)
at oracle.odi.core.OdiInstance.createInstance(OdiInstance.java:521)
at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.testConnection(SnpsDialogLoginDetail.java:755)
to com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.access$ 4 (SnpsDialogLoginDetail.java:743)
to com.sunopsis.graphical.dialog.SnpsDialogLoginDetail$ 2.performAction(SnpsDialogLoginDetail.java:287)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
to java.awt.EventQueue.access$ 400 (EventQueue.java:81)
in java.awt.EventQueue$ 2.run(EventQueue.java:627)
in java.awt.EventQueue$ 2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)
in java.awt.EventQueue$ 3.run(EventQueue.java:641)
in java.awt.EventQueue$ 3.run(EventQueue.java:639)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
in java.awt.Dialog$ 1.run(Dialog.java:1044)
in java.awt.Dialog$ 3.run(Dialog.java:1096)
at java.security.AccessController.doPrivileged (Native Method)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1543)
at java.awt.Window.setVisible(Window.java:843)
at java.awt.Dialog.setVisible(Dialog.java:984)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.LoginFactory.modifyLogin(LoginFactory.java:334)
to com.sunopsis.graphical.dialog.SnpsDialogLogin$ 3.performAction(SnpsDialogLogin.java:185)
at oracle.odi.ui.framework.event.OdiActionListener.actionPerformed(OdiActionListener.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
to java.awt.EventQueue.access$ 400 (EventQueue.java:81)
in java.awt.EventQueue$ 2.run(EventQueue.java:627)
in java.awt.EventQueue$ 2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)
in java.awt.EventQueue$ 3.run(EventQueue.java:641)
in java.awt.EventQueue$ 3.run(EventQueue.java:639)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
in java.awt.Dialog$ 1.run(Dialog.java:1044)
in java.awt.Dialog$ 3.run(Dialog.java:1096)
at java.security.AccessController.doPrivileged (Native Method)
at java.awt.Dialog.show(Dialog.java:1094)
at java.awt.Component.show(Component.java:1591)
at java.awt.Component.setVisible(Component.java:1543)
at java.awt.Window.setVisible(Window.java:843)
at java.awt.Dialog.setVisible(Dialog.java:984)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
at oracle.odi.ui.framework.adapter.DefaultAdapter.displayDialog(DefaultAdapter.java:242)
at oracle.odi.ui.framework.UIFramework.displayDialog(UIFramework.java:88)
at oracle.odi.ui.OdiConnectController.handleEvent(OdiConnectController.java:113)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
in javax.swing.plaf.basic.BasicMenuItemUI$ Handler.mouseReleased (BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
to java.awt.EventQueue.access$ 400 (EventQueue.java:81)
in java.awt.EventQueue$ 2.run(EventQueue.java:627)
in java.awt.EventQueue$ 2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)
in java.awt.EventQueue$ 3.run(EventQueue.java:641)
in java.awt.EventQueue$ 3.run(EventQueue.java:639)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: could not make connection JDBC; nested exception is java.sql.SQLException: Se ha powered una excepcion al get the conexion: oracle.ucp.UniversalConnectionPoolException: No. is you can get the conexion del origen of datos: java.sql.SQLException: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:524)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:613)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:111)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:121)
at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:136)
to oracle.odi.core.repository.support.RepositoryUtils$ RepositoryInfoSource.loadRepositoryInfo (RepositoryUtils.java:182)
at oracle.odi.core.repository.support.RepositoryUtils.loadWorkRepositoryInfo(RepositoryUtils.java:382)
at oracle.odi.core.repository.Repository.getWorkRepository(Repository.java:174)
... more than 144
Caused by: java.sql.SQLException: Se ha powered una excepcion al get the conexion: oracle.ucp.UniversalConnectionPoolException: No. is you can get the conexion del origen of datos: java.sql.SQLException: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
... more than 154
Caused by: java.sql.SQLException: Se ha powered una excepcion al get the conexion: oracle.ucp.UniversalConnectionPoolException: No. is you can get the conexion del origen of datos: java.sql.SQLException: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor
at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:488)
at oracle.ucp.util.UCPErrorHandler.throwSQLException(UCPErrorHandler.java:163)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:943)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:873)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:863)
at sun.reflect.GeneratedMethodAccessor95.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
to oracle.odi.core.datasource.support.RuntimeClassLoaderDataSourceCreator$ DataSourceInvocationHandler.invoke (RuntimeClassLoaderDataSourceCreator.java:48)
to $Proxy0.getConnection (Unknown Source)
to oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ ConnectionProcessor.run (LoginTimeoutDatasourceAdapter.java:217)
to java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:439)
to java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: oracle.ucp.UniversalConnectionPoolException: No. is you can get the conexion del origen of datos: java.sql.SQLException: listener refused the connection with the following error:
ORA-12505, TNS:listener is not currently of SID given in connect descriptor
at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:368)
at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:49)
at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:80)
at oracle.ucp.jdbc.DriverConnectionFactoryAdapter.createConnection(DriverConnectionFactoryAdapter.java:122)
to oracle.ucp.common.UniversalConnectionPoolImpl$ UniversalConnectionPoolInternal.createOnePooledConnectionInternal (UniversalConnectionPoolImpl.java:1610)
to oracle.ucp.common.UniversalConnectionPoolImpl$ UniversalConnectionPoolInternal.access$ 600 (UniversalConnectionPoolImpl.java:1446)
at oracle.ucp.common.UniversalConnectionPoolImpl.createOnePooledConnection(UniversalConnectionPoolImpl.java:514)
at oracle.ucp.jdbc.oracle.OracleJDBCConnectionPool.createOnePooledConnection(OracleJDBCConnectionPool.java:129)
at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:297)
at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:142)
at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:157)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:931)
... 14 more
Please, if someone could give me a tip. Thank you!!!Looks like a problem with the tnsnames file / wrong sid. try using tnsping
> that you will be in your tnsnames.ora. -
ORA-12505 TNS Listener does not currently in SID
Hello
When I try to connect to Oracle Sql developer, error "ORA-12505 TNS Listener does not currently of SID given in connect descriptor". ""
I use 11 GR 1 material on Windows XPSP2 platform. But several sql works very well.
Thank you
Published by: user12222356 on April 11, 2010 07:20user12222356 wrote:
This time the Sql developer is connected successfully. But there is not a question of being happy because what happens frequently. Sometimes is connected while sometimes the connection refused... All, it seems, is that SQL Developer connection to the Oracle server depends on luck.
Is there any solution to get rid of this problem?It's a matter of timing.
First thing that should be launched is the listener. Who should be started on boot. For a laptop or another machine which uses the DHCP protocol, the listener must be configured to talk to the loopback adapter.
Then the database should be started to talk to listening on the port of sight to the listener - it is applied either with the "LOCAL_LISTENER" database being left to null (for the default listener on 1521). This can be checked by "Lsnrctl status" showing the instance of database such as saved and available.
Then the SQLDeveloper can start up, pointing to the same host, port, and service/instance, as shown in "lsnrctl status".
-
ORA-12505, TNS:listener is not currently of SID...
The President complied,
I installed
It worked fine for 2 days and its suddenly began raise the following error:Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
My listener.orajava.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:XE
My tnsnames.ora# listener.ora Network Configuration File: c:\oracle\product\10.1.0\db_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = c:\oracle\product\10.1.0\db_1) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) )
My sqlnet.ora# tnsnames.ora Network Configuration File: c:\oracle\product\10.1.0\db_1\network\admin\tnsnames.ora # Generated by Oracle configuration tools. XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
My JDBC class:# sqlnet.ora Network Configuration File: c:\oracle\product\10.1.0\db_1\network\admin\sqlnet.ora # Generated by Oracle configuration tools. SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Journal of the listenerimport java.sql.Connection; import java.sql.DriverManager; public class DB{ public static Connection getOracleConnection() throws Exception { String driver = "oracle.jdbc.driver.OracleDriver"; String url = "jdbc:oracle:thin:@127.0.0.1:1521:XE"; String username = "RMS"; String password = "s09204031"; Class.forName(driver); Connection cnn = DriverManager.getConnection(url, username, password); return cnn; } }
Thank you and best regardsTNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production on 17-NOV-2009 16:01:55 Copyright (c) 1991, 2004, Oracle. All rights reserved. System parameter file is c:\oracle\product\10.1.0\db_1\network\admin\listener.ora Log messages written to c:\oracle\product\10.1.0\db_1\network\log\listener.log Trace information written to c:\oracle\product\10.1.0\db_1\network\trace\listener.trc Trace level is currently 0 Started with pid=3644 Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE 17-NOV-2009 16:01:57 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=168821248)) * status * 0 17-NOV-2009 16:02:47 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=services)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=168821248)) * services * 0 17-NOV-2009 16:02:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=168821248)) * status * 0
Run "lsnrctl status" and if she does not see that your XE service you may need to manually add in listener.ora part SID_LIST:
for example:SID_LIST_LISTENER10G =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = c:\oracle\product\10.1.0\db_1)
(= Extproc PROGRAM)
)
(SID_DESC =
(GLOBAL_DBNAME = XE)
(SID_NAME = XE)
(ORACLE_HOME = c:\oracle\product\10.1.0\db_1)
)
)or similar...
Also, make sure that you can resolve localhost for example ping localhost
Edited by: Kecskemethy November 17, 2009 06:12
-
ORA-12505: TNS: listener could not resolve SID in connection descript
Hello!
I have a teacher of XP SP2 on my computer. I installed Oracle XE, ODP as a customer. I clould connect to my db. Then I put the proxy data. Next day, when I started my computer, I clould not connet to db. I got an error: ORA-12505: TNS: listener could not resolve SID in connection descript.
I change all *.ora files, but I checked and I found nothing. I started the lsnrctl and there was no xe services. I couldn't connect to the db with the Oracle SQLDeveloper. I have disabled the connection to the local network (without rebooting), then I clould connect to the db. Then I enabled the LAN connection and everything was OK. So, when I restart my computer I have to turn off the connection to the local network, and then connect to the db and activate the connection to the local network.
What clould be the problem?
Thank you.Hi Pavan
Orace XE use CLRExtProc in the default listener.
for example:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(= Extproc PROGRAM)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(= Extproc PROGRAM)
)
)LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP) (HOST = APPLIED - NB.datacom.co.nz)(PORT = 1521))
)
)DEFAULT_SERVICE_LISTENER = (XE)
See you soon,.
Francisco Munoz Alvarez
http://www.oraclenz.com -
I tried to create the day before without the DG broker. However, I get this error in the primary alert log which I am not able to solve.
Heartbeat PING [ARC6]: Unable to connect to the day before "to_standby". The error is 12505.
Mon Jul 04 12:41:35 2011
Logging of 12505 errors received on the eve
Mon Jul 04 12:41:35 2011
Errors in the d:\oracle\p11\saptrace\background\p11_arc6_1904.trc file:
ORA-12505: TNS:listener is not currently of SID given in connect descriptor
Heartbeat PING [ARC6]: Unable to connect to the day before "to_standby". The error is 12505.
The primary server pFile
* ._B_TREE_BITMAP_PLANS = FALSE
* ._IN_MEMORY_UNDO = FALSE
* ._INDEX_JOIN_ENABLED = FALSE
* ._OPTIM_PEEK_USER_BINDS = FALSE
* ._OPTIMIZER_MJC_ENABLED = FALSE
* ._SORT_ELIMINATION_COST_RATIO = 10
* ._TABLE_LOOKUP_PREFETCH_SIZE = 0
* .archive_lag_target = 0
* .background_dump_dest = a: \oracle\P11\saptrace\background'
* full = '10.2.0'
* .control_file_record_keep_time = 30
*.control_files='d:\oracle\P11\origlogA\cntrl\cntrlP11.dbf','d:\oracle\P11\origlogB\cntrl\cntrlP11.dbf','d:\oracle\P11\sapdata1\cntrl\cntrlP11.dbf '
* .core_dump_dest = a: \oracle\P11\saptrace\background'
* .db_block_size = 8192
* .db_cache_size = 260938137
* .db_files = 254
* .db_name = "P11".
* .db_unique_name = "P11_primary".
* .dml_locks = 4000
* .event = 10191 trace the context of name forever, level 1'
*. FAL_Client = "to_primary."
*. FAL_Server = "to_standby."
*. FILESYSTEMIO_OPTIONS = "setall".
* .job_queue_processes = 1
* .local_listener ='(ADRESSE = (PROTOCOL = TCP) (HOST = 10.0.1.104)(PORT = 1521))'
* .log_archive_config = 'dg_config = (P11_disaster, P11_primary)'
*. Log_archive_dest_1 = 'LOCATION = C:\oracle\P11\oraarch\P11arch VALID_FOR =(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME = P11_primary'
* .log_archive_dest_2 = "SERVICE = to_standby LGWR ASYNC DELAY = 5 VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = P11_disaster'"
* .log_archive_dest_state_1 = 'enable '.
* .log_archive_dest_state_2 = 'ENABLE '.
* .log_archive_max_processes = 10
* .log_archive_min_succeed_dest = 1
* .log_buffer = 1048576
* .log_checkpoint_interval = 0
* .log_checkpoints_to_alert = true
* .open_cursors = 800
* .parallel_execution_message_size = 16384
* .pga_aggregate_target = 347917516
* runoff = 80
* .query_rewrite_enabled = "false".
* .recyclebin = "off".
* .remote_login_passwordfile = "exclusive."
* .remote_os_authent = true
* .replication_dependency_tracking = false
* Once = 96
* .sga_max_size = 521876275
* .shared_pool_reserved_size = 26093813
* .shared_pool_size = 300938137
* .sort_area_retained_size = 0
* .sort_area_size = 2097152
* .standby_file_management = "AUTO".
* .star_transformation_enabled = 'true '.
* .undo_management = "AUTO".
* .undo_retention = 43200
* .undo_tablespace = "PSAPUNDO".
* .user_dump_dest = a: \oracle\P11\saptrace\usertrace'
Standby server pFile
* ._B_TREE_BITMAP_PLANS = FALSE
* ._IN_MEMORY_UNDO = FALSE
* ._INDEX_JOIN_ENABLED = FALSE
* ._OPTIM_PEEK_USER_BINDS = FALSE
* ._OPTIMIZER_MJC_ENABLED = FALSE
* ._SORT_ELIMINATION_COST_RATIO = 10
* ._TABLE_LOOKUP_PREFETCH_SIZE = 0
* .background_dump_dest = a: \oracle\P11\saptrace\background'
* full = '10.2.0'
* .control_file_record_keep_time = 30
*.control_files='d:\oracle\P11\origlogA\cntrl\control01.ctl','d:\oracle\P11\origlogB\cntrl\control02.ctl','d:\oracle\P11\sapdata1\cntrl\control03.CTL '
* .core_dump_dest = a: \oracle\P11\saptrace\background'
* .db_block_size = 8192
* .db_cache_size = 155870822
* .db_files = 254
* .db_name = "P11".
* .db_unique_name = "P11_disaster".
* .dml_locks = 4000
* .event = 10191 trace the context of name forever, level 1'
*. FAL_Client = "to_standby."
*. FAL_Server = "to_primary."
*. FILESYSTEMIO_OPTIONS = "setall".
* .job_queue_processes = 1
* .local_listener ='(ADRESSE = (PROTOCOL = TCP) (HOST = 10.0.1.102)(PORT = 1521))'
* .log_archive_config = 'DG_CONFIG = (P11_primary, P11_disaster)'
*. Log_archive_dest_1 = 'LOCATION = C:\oracle\P11\oraarch\P11arch VALID_FOR =(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME = P11_disaster'
* .log_archive_dest_2 = "SERVICE = to_primary LGWR ASYNC DELAY = 5 VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = P11_primary'"
* .log_archive_dest_state_1 = 'enable '.
* .log_archive_dest_state_2 = 'enable '.
* .log_archive_max_processes = 10
* .log_buffer = 1048576
* .log_checkpoint_interval = 0
* .log_checkpoints_to_alert = true
* .open_cursors = 800
* .parallel_execution_message_size = 16384
* .pga_aggregate_target = 207827763
* runoff = 80
* .query_rewrite_enabled = "false".
* .recyclebin = "off".
* .remote_login_passwordfile = "exclusive."
* .remote_os_authent = true
* .replication_dependency_tracking = false
* Once = 96
* .sga_max_size = 311741644
* .shared_pool_reserved_size = 15587082
* .shared_pool_size = 300870822
* .sort_area_retained_size = 0
* .sort_area_size = 2097152
* .standby_file_management = "AUTO".
* .star_transformation_enabled = 'true '.
* .undo_management = "AUTO".
* .undo_retention = 43200
* .undo_tablespace = "PSAPUNDO".
* .user_dump_dest = a: \oracle\P11\saptrace\usertrace'
Primary file TNSnames
################
# File...: tnsnames.ora
# Created...: created by SAP AG, R/3 rel. > = 6.10
# Name...:
# Date of...:
# @(#) $Id: / / bc/700-1_REL/src/ins/SAPINST/impl/NPT/ora/ind/TNSNAMES. ORA #4 $
################
P11. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.104)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11. WORLD)
)
)
TO_STANDBY. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.102)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11_DISASTER. WORLD)
)
)
TO_PRIMARY. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.104)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11_PRIMARY. WORLD)
)
)
LISTENER_P11. WORLD = (address = (protocol = tcp (port = 1527))(host=10.0.1.104))
Primary listener.ora
################
# File...: listener.ora
# Created...: created by SAP AG, R/3 rel. > = 6.10
# Name...:
# Date of...:
# @(#) $Id: / / bc/700-1_REL/src/ins/SAPINST/impl/NPT/ora/ind/LISTENER. ORA #4 $
################
ADMIN_RESTRICTIONS_LISTENER = we
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = P11. WORLD)
)
(ADDRESS =
(PROTOCOL = IPC)
(KEY = P11)
)
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = prod104)
(PORT = 1527)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
Tnsnames.ora standby
################
# File...: tnsnames.ora
# Created...: created by SAP AG, R/3 rel. > = 6.10
# Name...:
# Date of...:
# @(#) $Id: / / bc/700-1_REL/src/ins/SAPINST/impl/NPT/ora/ind/TNSNAMES. ORA #4 $
################
################
# File...: tnsnames.ora
# Created...: created by SAP AG, R/3 rel. > = 6.10
# Name...:
# Date of...:
# @(#) $Id: / / bc/700-1_REL/src/ins/SAPINST/impl/NPT/ora/ind/TNSNAMES. ORA #4 $
################
P11. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.104)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11. WORLD)
)
)
TO_STANDBY. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.102)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11_STANDBY. WORLD)
)
)
TO_PRIMARY. WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.104)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = P11)
(GLOBAL_NAME = P11_PRIMARY. WORLD)
)
)
LISTENER_P11. WORLD = (address = (protocol = tcp (port = 1527))(host=10.0.1.102))
Standby listener.ora
################
# File...: listener.ora
# Created...: created by SAP AG, R/3 rel. > = 6.10
# Name...:
# Date of...:
# @(#) $Id: / / bc/700-1_REL/src/ins/SAPINST/impl/NPT/ora/ind/LISTENER. ORA #4 $
################
ADMIN_RESTRICTIONS_LISTENER = we
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = P11. WORLD)
)
(ADDRESS =
(PROTOCOL = IPC)
(KEY = P11)
)
(ADDRESS =
(= SAP COMMUNITY. WORLD)
(PROTOCOL = TCP)
(HOST = 10.0.1.102)
(PORT = 1527)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
Please advice.
Concerning
Published by: dharm.singh on July 4, 2011 12:33 AMAs you can see on the lsnrctl status output doesn't support any service
Try adding the SID_LIST_LISTENER parameter in listener.ora file
Check out this link and SID_LIST_LISTENER parameter
http://www.Oracle-base.com/articles/9i/DataGuard.php
Maybe you are looking for
-
Everytime I open iTunes it won' play what either because she insists, he does not know the location of the file on the track, I want to play, but when I watch the news. on the track, it has the path of the saved file. HOW CAN THIS BE? WHAT IS SOMETHI
-
error 0x8024400A every time I try to use windows update
I get an error code whenever I try to use windows update. Also it won't let me download sp3, if I do it manually when I restart my computer will only start in safe mode.
-
Error Windows Update - 8E5E152, 8E5E03FA
Original title: How can I fix the error message 8E5E152 I tried several times to download updates for Windows Vista, but get the error message 8E5E152. How can I erase this? Also 8E5E03FA
-
How to notify incoming e-mails that I'm away on vacation
on notification of vacation
-
then all of a sudden my photoshop does not work and I need it for my business. It says that I need to renew the liscence? what I'm doing. He said to reinstall but I moved and it was installed years ago.no idea where the discs are! Help?