Solved

COnnectin to sqlserver from oracle

Posted on 2011-02-16
14
776 Views
Last Modified: 2012-05-11
Hi

I am trying to connect sqlserver from Oracle using HS gateways. I configured listener,tnsnames.ora successfullyl Listerner also started succcessfuly

After that I created database link in Oracle , but when i am trying to connect to sqlserver from oracle, i am getting following error:

ORA_12154: TNS: COULD NOT RESOLVE THE cONNECT IDENTIFIER SPECIFIED

Please help me to fix this issue. Its very urgent


fyi:

I installed ORACLE HS gateway software on the machine where oracle client is installed and also on the same machine itself is Sqlserver database server.


Thx
Naren
0
Comment
Question by:knaren1975
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 2

Expert Comment

by:niaz
ID: 34913508
Do you have more then one Oracle installed on your system? if so, please make sure that you have configure your tnsnames.ora file for the right Oracle Install.

Please make sure that your parenthesis are matched when you edited your tnsnames.ora and listener.ora files.

You can use tnsping command from command prompt to verify the connectivity and your TNS Service Name Descriptor. This will also give the path for the TNS_ADMIN folder in use.

Please post your listener.ora and tnsnames.ora files.
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 34913605
0
 

Author Comment

by:knaren1975
ID: 34913624
Hi Niaz,

Please find the listener and tnsnames.ora files below:

# listener.ora Network Configuration File: F:\app\product\11.1.0\client_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENERMYSQLSERVERDSN =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )


SID_LIST_LISTENERMYSQLSERVERDSN=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=testfeed)
         (ORACLE_HOME = F:\app\product\11.1.0\client_1)
         (PROGRAM=dg4odbc)
       )
      )

ADR_BASE_LISTENERMYSQLSERVERDSN = F:\product\11.2.0\tg_1

TNSNAME.ORA
=============

MYSQLSERVERDSN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (COMMUNUITY = tcp.world)(PROTOCOL = TCP)(HOST = <oraclehostname>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = ismfeed)
      (HS=OK)
    )
  )


I checked tnsping and listener they are fine.

thx
Naren
0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 34913630
Can u share with us your tnsnames settings? You can find the file on your ORACLE HS gateway machine on <drive>\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora

As per below tnsnames sample, you should use "MYDB" as the databse host string.

MYDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.23.150.33)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = MYPRODDB)
    )
  )
0
 

Author Comment

by:knaren1975
ID: 34913827
Hi

In the hostname of TNS entry do we need to give the Oracl client Hostname or sqlserver database hiostname. pls clarify

thx
Naren
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 34913844
Hi knaren,

In the tnsnames, you need to give the Oracle client hostname.
0
 

Author Comment

by:knaren1975
ID: 34913966
Hi

I used servername where oracleclient is installed  as hostname in tnsnames.ora after changing i am getting the following error :

ORA-12518: TNS:listener could not hand off client connection

thx
Naren
0
 

Author Comment

by:knaren1975
ID: 34914058
Hi

pls let mwe know In TNS Listener under oracl_home, do we need to give the home  directory name of Oracle Gate way or client home directory?

thx
Naren
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 34914062
1-Check whether your listener version is compatible with the database. Use same or higher version of listener.

2-Set following parameter in listener.ora and restarted listener:
DIRECT_HANDOFF_TTC_LISTENER=OFF

3-Check the DB Processes:
select * from v$resource_limit where resource_name='processes';

RESOURCE_NAME | CURRENT_UTILIZATION | MAX_UTILIZATION | INITIAL_ALLO | LIMIT_VALUE
processes             |                22                      |               34             |       150               |      150

alter system set processes=300 scope=spfile;

0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 34914115
For Oracle Home, use the location of your Oracle home directory.
eg: c:\oracle\product\11.1.0\client_1
0
 

Author Comment

by:knaren1975
ID: 34914566
Hi Zaharin

My oracle client version is 11.1.0 where as gateway version is 11.2.0 is that causing issue?

thx
Naren
0
 

Author Comment

by:knaren1975
ID: 34914730
tje follwoing is my listener file

# listener.ora Network Configuration File: F:\app\product\11.1.0\client_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENERMYSQLSERVERDSN =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = loncsdbdion1.uk.db.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )


SID_LIST_LISTENERMYSQLSERVERDSN=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=ismfeed)
         (ORACLE_HOME = F:\app\product\11.1.0\client_1)
         (PROGRAM=dg4odbc)
       )
      )

ADR_BASE_LISTENERMYSQLSERVERDSN = F:\product\11.2.0\tg_1

0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 34940599
Hi knaren,

client version must always same or newer than the database server
0
 

Author Comment

by:knaren1975
ID: 34940640
Hi

Atlast i am able to fix the issue. thanks to all for your help

THx
Naren
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question