Home > tns could > ora 12154 error visual studio

Ora 12154 Error Visual Studio

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About

Ora-12154 Tns Could Not Resolve The Connect Identifier

Us Learn more about Stack Overflow the company Business Learn more about hiring ora-12154 tns could not resolve service name developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the

Ora-12154 Tns Could Not Resolve The Connect Identifier Specified Windows 7

Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VS2010 + Oracle driver: ORA-12154: TSN:could tns could not resolve the connect identifier specified visual studio not resolve the connect identifier specified up vote 3 down vote favorite I am using: Visual Studio 2010 .Net Framework Data Provider for Oracle Oracle Developer Tools for Visual Studio (from Oracle's website) I tried installing 'Oracle Developer Tools for Visual Studio' and created tnsnames.ora and sqlnet.ora files in my C:\app\ [my username]\product\11.2.0\client_1\Network\Admin directory. They look like this: # tnsnames.ora ORATEST = (DESCRIPTION = (ADDRESS_LIST = visual studio ora-12154 (ADDRESS = (PROTOCOL = TCP)(HOST = dbs-oratest)(PORT = 1521)) ) (CONNECT_DATA = (SID = [ORATEST]) ) ) and # sqlnet.ora SQLNET.AUTHENTICATION_SERVICES= (ALL) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) When I try using the .Net Framework Data Provider for Oracle driver to set up a new connection (or any other driver for that matter: OLE, ODBC, etc) it gives the error: ORA-12154: TSN:could not resolve the connect identifier specified Using the OLE driver on a machine without the Oracle client installed DOES work though: OleDbConnection conn = new OleDbConnection( "Provider=MSDAORA;Data Source=ORATEST;" + "Persist Security Info=True;Password=readonly;User ID=readonlyuser"); What am I doing wrong? Are there any simple instructions online about how to install a basic Oracle driver? Thank you in advance! .net visual-studio oracle driver share|improve this question asked Nov 19 '10 at 19:40 Matt 1,79631833 add a comment| 4 Answers 4 active oldest votes up vote 3 down vote accepted The best solution I found was to use the Oracle Data Access Client library, and include the entire TNS names entry in the connection string. This allows the project to be easily published to a web server, ClickOnce, etc. Here are the steps necessary to set up the Oracle driver work

while creating a linked server to Oracle ★★★★★★★★★★★★★★★ SnehadeepJune 30, 201028 Share 0 0 This is one of the most common errors while creating linked server to Oracle database. Today I will discuss the

Tns Could Not Resolve The Connect Identifier Specified Oracle 10g

reason for this error and possible resolutions.

Full error message:

OLE ora-06413 DB provider "MSDAORA" for linked server "LINKED_ORA" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".

Msg 7303,

Tnsnames.ora Location

Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "MSDAORA" for linked server "LINKED_ORA".

First of all make sure you have reviewed the following http://stackoverflow.com/questions/4228739/vs2010-oracle-driver-ora-12154-tsncould-not-resolve-the-connect-identifier Microsoft KB article that has a lot of good information on troubleshooting Oracle linked server issues.

How to set up and troubleshoot a linked server to an Oracle database in SQL Server

http://support.microsoft.com/kb/280106 Also make sure you have installed Oracle Client on the SQL server. If the SQL server is 64 bit then we need to install 64 bit Oracle provider. You can also create https://blogs.msdn.microsoft.com/dataaccesstechnologies/2010/06/30/ora-12154-tns-could-not-resolve-the-connect-identifier-specified-error-while-creating-a-linked-server-to-oracle/ linked server using Oracle ODBC driver together with Microsoft OLE DB provider for ODBC. Once again on a 64 bit SQL server you need to install the 64-Bit OLEDB Provider for ODBC (MSDASQL) and 64 bit Oracle ODBC drivers. However 64-Bit OLEDB Provider for ODBC (MSDASQL) is already there in Windows Vista/Windows Server 2008 and later OS.

This particular error message is a very general error message and can happen for quite a number of reasons. For general understanding of the error, you can review oracle documentation like this http://ora-12154.ora-code.com/

In SQL Server Linked Server, it could indicate a few things (not limited to)–

1. SQL Server (and oracle net libraries) is not able to get the TNS alias from tnsnames.ora file.

2. Something is wrong with the way the alias is created in the tnsnames.ora file (incorrect syntax)

3. TNS alias could not be resolved into a connect descriptor

Below is a list of things that you can try to resolve this issue.

1. Verify that the tnsnames.ora file has the alias and the service name that the customer is using.

TNS entry for the Oracle database

==

through Server Explorer in Visual Studio, you have to ensure that:1. You have installed the Oracle Data Provider (downloadable from the Oracle Website)2. Have created the tnsnames.ora file, holding information about http://www.yyosifov.com/2011/10/ora-12154-tnscould-not-resolve-connect.html the databases (http://www.orafaq.com/wiki/Tnsnames.ora). This file should be created most often in the Network\Admin folder under the Oracle Provider. In my case: C:\app\user\product\11.2.0\client_1\Network\AdminAfter having these prerequisites, I still couldn't connect to the Oracle Database. The Visual Studio wizard told me: "ORA-12154: TNS:could not resolve the connect identifier specified". What resolved this issue for me was to add the Environment Variable with name "TNS_ADMIN" and value the Path to the tns could directory containing the "tnsnames.ora" file.Something like:TNS_NAMES="C:\app\user\product\11.2.0\client_1\Network\Admin"Then just restart Visual Studio and you're free to go.Hope this helps someone out there :) Posted by cypressx at 8:05 AM Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest 27 comments: Anonymous said... Has the same issue as you and this blog post helped me resolve my issue.Thanks ......... December 24, 2011 at 8:45 AM Anonymous said... this helped me a tns could not lot. i love you man. April 9, 2012 at 10:06 AM Kannan said... will u please explain me further clear.. am using oracle 10g express edition.. i am facing this problem for a week.. pls help me.. April 29, 2012 at 11:14 AM abdul sharique said... Hi kannanCan u plz share oracle database 10g . bcoz we r unable to find it on Oracle site. June 14, 2012 at 4:26 AM Anonymous said... You are the man! It worked pretty easy. June 22, 2012 at 1:26 AM Anonymous said... how can i add enviorment variable ??kindly tell me please June 26, 2012 at 12:35 AM cypressx said... This comment has been removed by the author. June 26, 2012 at 3:48 AM cypressx said... Hi, please take a look here:http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/There is a step-by-step guide with screenshots.Best,Yosif June 26, 2012 at 3:49 AM Kishore Peddada said... Yosif...YO man .THANK YOUYou same hell of time, I was breaking my dead, I did added environment variables, but not restarted VS2010After reading your blog, I restarted VS, it started working..thanks September 7, 2012 at 1:38 PM alain said... I spent hours Binging/Googling on this topic. Yosif, You're the man! September 14, 2012 at 4:12 PM kutu

 

Related content

error in initializing provider ora-12154

Error In Initializing Provider Ora- table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Tns Could Not Resolve The Connect Identifier Specified Windows a li li a href Tns Could Not Resolve The Connect Identifier Specified Oracle g a li li a href Tns- Failed To Resolve Name a li ul td tr tbody table p while creating a linked server to Oracle x x x x x x x x x x x x x x x SnehadeepJune This relatedl is one of the most common errors while ora tns could not

error ora 12154 tns could not resolve connect identifier specified

Error Ora Tns Could Not Resolve Connect Identifier Specified table id toc tbody tr td div id toctitle Contents div ul li a href Ora Tns Could Not Resolve The Connect Identifier Specified Xe a li li a href Ora Tns Could Not Resolve The Connect Identifier Specified g a li li a href Ora Tns Could Not Resolve The Connect Identifier Specified N a li li a href Ora Tns Could Not Resolve Service Name Oracle i a li ul td tr tbody table p while creating a linked server to Oracle x x x x x x x

error ora-12154 tns could not resolve the connect

Error Ora- Tns Could Not Resolve The Connect table id toc tbody tr td div id toctitle Contents div ul li a href System Data Oracleclient Oracleexception Ora Tns Could Not Resolve The Connect Identifier Specified a li li a href Ora Tns Could Not Resolve Service Name Oracle i a li li a href Ora Tns Could Not Resolve Service Name Windows a li ul td tr tbody table p TNS received bad packet type from network layer Cause Internal error Action Not normally visible to the user For further details turn on tracing and relatedl reexecute the operation

oci error 12154

Oci Error table id toc tbody tr td div id toctitle Contents div ul li a href Test Connection Failed Because Of An Error In Initializing Provider Ora- a li li a href Ora- Sqlplus a li ul td tr tbody table p Read Quick Links Today's Posts View Site Leaders Who's Online Advanced Search Forum Microsoft SSIS Connectors and Change Data Capture by Attunity Microsoft SSIS Connectors by Attunity Microsoft SSIS Oracle Connector relatedl ORA- TNS could not resolve the connect identifier specified Results to ora tns could not resolve the connect identifier specified g of Thread ORA- TNS

odbc error ora-12514

Odbc Error Ora- table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Tns Could Not Resolve Service Name Oracle g a li li a href Ora Tns Could Not Resolve Service Name Oracle i a li li a href Ora Error In Oracle g a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us relatedl Learn more about Stack Overflow the company Business Learn more about

odp.net tns error

Odp net Tns Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora Tns Could Not Resolve The Connect Identifier Specified g a li li a href Ora- Oracle c a li li a href Ora Tns Could Not Resolve Service Name a li li a href Oracle Managed Data Access a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more p h

oo4o tns error

Oo o Tns Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Tns Could Not Resolve The Connect Identifier Specified Windows a li li a href Tns Could Not Resolve The Connect Identifier Specified Visual Studio a li li a href Oracle Provider For Ole Db a li ul td tr tbody table p CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError You don't have JavaScript enabled This tool uses JavaScript and much of it will not work correctly without relatedl it enabled Please turn JavaScript back on and ora tns could

ora 12154 error in visual studio 2010

Ora Error In Visual Studio table id toc tbody tr td div id toctitle Contents div ul li a href Visual Studio Ora- a li li a href Ora- Tns Could Not Resolve The Connect Identifier a li li a href Tns Could Not Resolve The Connect Identifier Specified Oracle g a li li a href Tnsnames ora Location a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta p h id Visual Studio Ora- p Discuss the workings and policies of

ora-12154 ssis error

Ora- Ssis Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora Tns Could Not Resolve The Connect Identifier Specified g a li li a href Ora- Tns Could Not Resolve Service Name a li li a href Tns Could Not Resolve The Connect Identifier Specified Visual Studio a li li a href Tns Could Not Resolve The Connect Identifier Specified Oracle g a li ul td tr tbody table p HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ relatedl Search related threads Remove From My Forums p h

ora-12154 sqlplus error

Ora- Sqlplus Error table id toc tbody tr td div id toctitle Contents div ul li a href Tnsping Works But Sqlplus Does Not Ora- a li li a href Ora- Tns Could Not Resolve Service Name a li li a href Sqlnet ora Example a li ul td tr tbody table p log in tour help Tour Start here for a quick overview of relatedl the site Help Center Detailed answers to any tns could not resolve service name sqlplus questions you might have Meta Discuss the workings and policies of p h id Tnsping Works But Sqlplus Does

oracle error 12151

Oracle Error table id toc tbody tr td div id toctitle Contents div ul li a href Ora- Tns Could Not Resolve Service Name a li li a href Error While Trying To Retrieve Text For Error Ora- a li li a href Tns Could Not Resolve The Connect Identifier Specified Odbc a li ul td tr tbody table p TNS received bad packet type from network layer Cause Internal error Action Not normally visible to the user For relatedl further details turn on tracing and reexecute the operation ora error in oracle g If error persists contact Worldwide Customer

oracle listener error code 10559

Oracle Listener Error Code table id toc tbody tr td div id toctitle Contents div ul li a href Ora Tns No Listener a li li a href Ora- Tns Could Not Resolve Service Name Oracle g a li li a href Tns Could Not Resolve The Connect Identifier Specified Sqlplus a li ul td tr tbody table p TNS received bad packet type from network layer Cause Internal error Action Not normally visible to the user For further details turn on tracing relatedl and reexecute the operation If error persists contact Worldwide Customer ora- error Support ORA- TNS unable