Link to home
Start Free TrialLog in
Avatar of NetSri
NetSri

asked on

using tnsnames.ora without ODP.NET

Hello I am able to connect to oracle using ODP.NET Method Shown below.

"User Id=user12;Password=pass12;Data Source=(DESCRIPTION=" +
                    "(ADDRESS=(PROTOCOL=TCP)(HOST=hoscan12)(PORT=1526))" +
                    "(CONNECT_DATA=(SID=set12)));";

But unable to connect using below.

"Data Source=set12.WORLD;Persist Security Info=True;" +
                    "User ID=user12;Password=pass12;";

Error shown belwo.

Oracle.DataAccess.Client.OracleException ORA-12154: TNS:could not resolve the connect identifier specified    at Oracle.DataAccess.Client.OracleException

Help or advise
SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NetSri
NetSri

ASKER

User generated imageHello Rainer,

Thanks for this , but attached image tell you error i am having.

i just replaced my connection with your string replacing id,pwd and hoststring.

"Data Source=set12.WORLD;User ID=user12;Password=pass12;"

please point in right direction. Thanks
Could you please attach the entry of your tnsnames.ora?
What happens if you run a cmd and type
tnsping set12.WORLD
?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NetSri

ASKER

Hello Thank you very much for the replies. I get following error

when i try with
"Data Source=WHOUSET.WORLD;User ID=user12;Password=pass12;"


Test method bcsContactCenter.Test.PersonServiceTest.ReadItemNotFoundTest threw exception:
Oracle.DataAccess.Client.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified

Please help
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NetSri

ASKER

Thank you all