• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

TNS connection issue

Experts -

I get this below ORA error when I convert the single instance to 2 node RAC because the SID names are different.

The single Instance SID is DBNAME and the RAC SIDs are DBNAME1 & DBNAME2.

Error
-----
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
singlehost.mm.us:1521:DBNAME

Application Connection String
------------------------------
<connection-url>jdbc:oracle:thin:@singlehost.mm.us:1521:DBNAME</connection-url>

if I change the connection string like below the application works fine but I cannot change it.

<connection-url>jdbc:oracle:thin:@rachost.mm.us:1521:DBNAME1</connection-url>

How to solve this issue?

Thanks,
sve.
0
sventhan
Asked:
sventhan
  • 5
  • 4
1 Solution
 
Swadhin RaySenior Technical Engineer Commented:
Check the TNS entry and your listener status by below command:

lsnrctl status
0
 
sventhanAuthor Commented:
No issues with listener. Its up and running. The problem I see is with the change in SID names.
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
Did you add any services using "srvctl add service -d <dbname> ... " ?
If yes, please use service name in the URL you are trying to connect.

<connection-url>jdbc:oracle:thin:@rachost.mm.us:1521:<service name here added with srvctl add service above></connection-url>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
sventhanAuthor Commented:
@ReliableDBA

Nope. I've not added any services and I'm planning to add it. Hope that will solve the issue.

Thanks.
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
Please add and it should.
Happy to assist further.
0
 
sventhanAuthor Commented:
@ReliableDBA

Can you give me a sample how to create the service?

my RAC database Name is : DBNAME

Instance Name is :DBNAME1/DBNAME2

parameter :

services_name = DBNAME

Thanks.

0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
What is your Oracle version please?
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
Please try this.

srvctl add service -d DBNAME -s DBNAME_APPL_SVC -l primary
0
 
sventhanAuthor Commented:
Thanks.
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
You are welcome.
Hope it worked for you.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now