Ora 12154 Error In Windows 7
Contents |
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 reason for this error and possible
Ora 12154 Could Not Resolve The Connect Identifier Specified
resolutions.
Full error message: OLE DB provider "MSDAORA" for linked server "LINKED_ORA" returned ora-12154 sqlplus message "ORA-12154: TNS:could not resolve the connect identifier specified". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the asp.net ora-12154: tns:could not resolve the connect identifier specified data source object of OLE DB provider "MSDAORA" for linked server "LINKED_ORA". First of all make sure you have reviewed the following Microsoft KB article that has a lot of good information on troubleshooting OracleError While Trying To Retrieve Text For Error Ora-12154
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 linked server using Oracle ODBC driver together with Microsoft OLE DB provider for ODBC. Once again on a 64Ora-12154 Tns Listener Does Not Currently Know Of Service Requested In Connect Descriptor
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 =========================== OracleDB_Dev = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = server01.mydomain.com)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = OracleDB) (SERVER = DEhere 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 tns could not resolve the connect identifier specified sqlplus Us Learn more about Stack Overflow the company Business Learn more about hiring
Sqlnet.ora Example
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 service name oracle 11g 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 ORA-12154 could not resolve the connect 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/ identifier specified up vote 11 down vote favorite 1 I have switched over to the 64bit Windows 7 and created a simple web app to test the connection to the database. I am using VS 2010 - plain asp.net web project and I am running the application from within VS. I am getting this error: "ORA-12154 could not resolve the connect identifier specified" I also have a http://stackoverflow.com/questions/7957955/ora-12154-could-not-resolve-the-connect-identifier-specified sample console application that tests the connection to the database, and it works fine. After googling it some, I found that a lot of posts online refered to permissions so I set my C:/Oracle permissions to read/write/execute for my ASP.net account, NETWORK SERVICE, COMPUTER NAME. That still won't solve the issue. I checked that my web app runs under my domain\username account and that this account that the rights to read/write/execute to the C:\Oracle folder. I even re-installed my VS to make sure that it is in C:\Program Files rather than C:\Program Files(x86) Any ideas to why my web app doesn't see the connection string? (while the console app does) Not sure what else I can do. asp.net oracle share|improve this question asked Oct 31 '11 at 18:24 sarsnake 7,64947129242 add a comment| 10 Answers 10 active oldest votes up vote 11 down vote I am going to assume you are using the tnsnames.ora file to specify your available database services. If so connection errors usually come down to two things. The application cannot find the TNS entry you specified in the connection string. The TNS entry was found, but the IP or host is not
connection methods and naming conventions. There are several common errors received when the Oracle drivers do not have the necessary route or naming syntax. The common Oracle errors seen with Tableau data connections are: ORA-12154: http://kb.tableau.com/articles/knowledgebase/oracle-connection TNS: could not resolve the connect identifier specified ORA-12514: TNS listener does not currently http://www.dba-oracle.com/t_ora_12154_tns_resolve_service_name.htm know of service requested in connect descriptor ORA-12541: TNS: no listener ORA-12170: TNS:Connect timeout occurred ORA-12504: TNS listener was not given the SERVICE_NAME in CONNECT_DATA The best way to correct or avoid these errors is to set up a connection to use TNSNames.ora. If after setting up this connection, you are still having connection problems, see the could not Troubleshooting Oracle Connection Errors article. Note: This article applies to Windows. For an equivalent article for the Mac platform, see Setting an Oracle Connection to Use TNSNames.ora or LDAP.ora on a Mac. Verify a TNSNames.ora file exists on the machine The TNSNames.ora file contains the specific information required to connect to the Oracle instance. By default, the TNSNames.ora file resides in {oracle home directory}\network\admin. For example, C:\Oracle_Client\network\admin. If a TNSNames.ora file does could not resolve not exist on the machine, you will need to create one in a text editor. We recommend storing the file in your My Documents folder as this is an easily identified folder and common on most machines. For example: C:\Users\jsmith\Documents. Below is a potential template for an entry. Elements in brackets must be replaced by values obtained from your database administrator. [net_service_name]=(DESCRIPTION= (ADDRESS=[protocol_address_information]) (CONNECT_DATA= (SERVICE_NAME=[service_name]) ) ) Below is an example entry that uses the template above:Production = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = prod.corp.com)(PORT = 1521) ) (CONNECT_DATA = (SERVICE_NAME= orcl) ) ) Set the TNS_Admin environment variable Create a Windows Environment variable that directs Oracle connections to use the information in the TNSNames.ora file. Then you can use the Oracle Net Service Names in Tableau data connections without needing to know the port, service, or SID specifics for each Oracle connection. Note: If you do not have an Oracle client installed on your computer, get the necessary files from your database administrator. Step 1 Determine the folder path for TNSNames. Step 2 Select Start > Control Panel > System. Step 3 In Windows 7, in the System window, select Advanced system settings. Alternatively, do the following: In Windows XP, in Classic View, double-click System.I
SQL TuningSecurityOracle UNIXOracle LinuxMonitoringRemote supportRemote plansRemote servicesApplication Server ApplicationsOracle FormsOracle PortalApp UpgradesSQL ServerOracle ConceptsSoftware SupportRemote Support Development Implementation Consulting StaffConsulting PricesHelp Wanted! Oracle PostersOracle Books Oracle Scripts Ion Excel-DB Don Burleson Blog
ORA-12154: TNS could not resolve service name tips Question: I need help with this error: ORA-12154: TNS: could not resolve service name.Answer: The ORA-12154 is a very common error, always related to your local copy of the tnsnames.ora file, your listener configuration and your database name aliases. Make sure that your listener is listening for the same service name that you are using. Your service name might have an alias, so check for global (world) entries and local entries. Check: $ORACLE_HOME/network/admin/tnsnames.ora Check your global_name setting with this SQL: select * from global_name; The query value should match your init.ora parms for db_name and db_domain, You can change the global_name with an ALTER DATABASE command, as follows: alter database rename global_name to xxx; Also see these notes on configuring your tnsnames.ora file and troubleshooting network errors. Rampant author Steve Callan notes this on the ORA-12154 error: "One of the most common errors related to improper configuration is the "ORA-12154: TNS: could not resolve service name" error. It is not uncommon for new users of Oracle to spend hours upon hours trying to figure out what their mistake is when ORA-12154 appears." The oerr utility notes this on the ORA-12154 error:: $oerr ora 12154 ORA-12154: TNS:could not resolve the connect identifier specifiedCause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming