in tnsnames.ora I have 2 entries:
node1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = eiger.reksoft.ru)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = PPB)
)
)
node2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = RAC.localdomain)
)
)
I can use both in the CONNECT command in sqlplus.
But in sqldeveloper only node1 works:
CONNECT scott/tiger@node1
Connected
...
CONNECT scott/tiger@node2
Error starting at line 2 in command:
CONNECT scott/tiger@node2
Error report:
Connection Failed
Commit
Not very informative, so I attached a java debugger and set breakpoints on SQLException constructors.
There's a hit in public SQLException(String reason, String SQLState, int vendorCode)
The argumenst are:
"Listener refused the connection with the following error:\nORA-12505, TNS:listener does not currently know of SID given in connect descriptor\n "
66000
12505
I think sqldeveloper is trying to connect using SID instead of SERVICE_NAME.
At the same sqldeveloper successfully connects to this tns name configured in the connection properties dialog.
The program version is 3.2.20.09, I downloaded it today.
Edited by: 940607 on 23.11.2012 4:26