Run the tnsping to see what ora file is using and what version of Oracle is using too. I had the same problem when I had Version 9i and 10g installed, I had to uninstall all versions and install 9i only to work again, it was a big pain, if the tnsping works
with the ORA file, you'll know what to do, unninstall and re-install everything but the VS2005
I should elaborate a little more in case anyone else looks at this post...
I found that when Oracle installed these tools it created 2 new directories under this directory:
C:\oracle\product\10.2.0
1. C:\oracle\product\10.2.0\client_1
2. C:\oracle\product\10.2.0\client_2
Under C:\oracle\product\10.2.0\client_2\network\ADMIN I needed to copy my existing TNSNAMES.ORA file.
I should elaborate a little more in case anyone else looks at this post...
I found that when Oracle installed these tools it created 2 new directories under this directory:
C:\oracle\product\10.2.0
1. C:\oracle\product\10.2.0\client_1
2. C:\oracle\product\10.2.0\client_2
Under C:\oracle\product\10.2.0\client_2\network\ADMIN I needed to copy my existing TNSNAMES.ORA file.
I didn't realize that I needed to do this.
I think the main problem is because 10g over writes the environment variables of any existing Oracle installations in the box, I also had to remove 10g because Oracle Meta link employees could not get 10g to let connection to 9i remain open, 9i was prodction
so 10g was removed. I also think you being able to move TNS ORA file to a new location is because you either have only 10g in your box or Oracle made changes in release 2.
Just a follow-up for others who may check this thread out.
I tried just about every variation on this fix that I could find online, and was just about to give-up and do a clean install, removing all versions except 10g...
If you've installed things like the Oracle data access components and are having problems such as this, do a TNSPing to make sure you do in fact know where it's hittting to get it's settings info.
Such as in this case, it may well be going into the newly created Network/Admin folder to get it's settings, when you were thinking it would be hitting the same Network/Admin folder it was previously (and was working under).
In our case we had a home folder at "C:\10gDev", along with a 9i Default home with the 10g home being the active one. After some installations of Oracle's data access tools, apparently using a default install, it created a new folder entirely seperate
for the new tool (since it assumed an install into the "oracle" folder, which didn't exists) *and* all of the network settings files and mucking-up the whole setup.
I feel this could have been avoided during install if attention were paid more closely to locations. In any event, we needed a quick fix to get the web applications back online and found that there were also some Oracle Installer version issues
(the newest one was needed to uninstall the components, but wasn't a part of the actual component installation (apparently)).
To get things back on-track quickly, I went into the Windows Environment Variables to hunt for the path that was causing the misdirection, it was appended right at the end (obviously) in this case...
I removed that path making *very sure* not to remove anything else beyond that. and verified that the old path was still there... Rebooted to ensure any initial path reads would re-occur.. and we were back up-and-running...
Not a beautiful solution, in my humble opinion, but if you are in-need of something to get things back quickly, perhaps give-it-a-go....
Daniel Pennington
(Insert Significant Credentials and Witty Comment Here)
drdexter33
Contributor
2287 Points
866 Posts
Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 15, 2006 03:30 PM|LINK
I just recently installed Oracle Developer Tools on my machine and now my app can't connect to our oracle database...
I keep getting this error:
Event Type: Error
Event Source: gmsDevLog
Event Category: None
Event ID: 0
Date: 12/15/2006
Time: 11:21:00 AM
User: N/A
Computer: WILL0007333
Description:
System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified
at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at CDataObject.getDataTable(String sql) in c:\Inetpub\wwwroot\gmsDev\App_Code\CDataObject.cs:line 55
Any ideas?
Thanks.
doug
albertpascual
All-Star
17520 Points
3475 Posts
MVP
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 16, 2006 03:17 PM|LINK
Al
My Blog
drdexter33
Contributor
2287 Points
866 Posts
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 09:11 PM|LINK
great...
Thanks for your reply!
Merry Christmas...
doug
albertpascual
All-Star
17520 Points
3475 Posts
MVP
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 09:25 PM|LINK
Al
My Blog
drdexter33
Contributor
2287 Points
866 Posts
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 09:27 PM|LINK
I should elaborate a little more in case anyone else looks at this post...
I found that when Oracle installed these tools it created 2 new directories under this directory:
C:\oracle\product\10.2.0
1. C:\oracle\product\10.2.0\client_1
2. C:\oracle\product\10.2.0\client_2
Under C:\oracle\product\10.2.0\client_2\network\ADMIN I needed to copy my existing TNSNAMES.ORA file.
I didn't realize that I needed to do this.
Caddre
All-Star
26581 Points
5308 Posts
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 10:26 PM|LINK
I think the main problem is because 10g over writes the environment variables of any existing Oracle installations in the box, I also had to remove 10g because Oracle Meta link employees could not get 10g to let connection to 9i remain open, 9i was prodction so 10g was removed. I also think you being able to move TNS ORA file to a new location is because you either have only 10g in your box or Oracle made changes in release 2.
Gift Peddie
albertpascual
All-Star
17520 Points
3475 Posts
MVP
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 10:50 PM|LINK
Al
My Blog
Caddre
All-Star
26581 Points
5308 Posts
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 10:59 PM|LINK
I think so too.
Gift Peddie
albertpascual
All-Star
17520 Points
3475 Posts
MVP
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
Dec 18, 2006 11:03 PM|LINK
Then its official.
Al
My Blog
dcpennington2
Member
225 Points
56 Posts
Re: Oracle Developer Tools ORA-12154: TNS:could not resolve service name
May 02, 2007 05:39 PM|LINK
Just a follow-up for others who may check this thread out.
I tried just about every variation on this fix that I could find online, and was just about to give-up and do a clean install, removing all versions except 10g...
If you've installed things like the Oracle data access components and are having problems such as this, do a TNSPing to make sure you do in fact know where it's hittting to get it's settings info.
Such as in this case, it may well be going into the newly created Network/Admin folder to get it's settings, when you were thinking it would be hitting the same Network/Admin folder it was previously (and was working under).
In our case we had a home folder at "C:\10gDev", along with a 9i Default home with the 10g home being the active one. After some installations of Oracle's data access tools, apparently using a default install, it created a new folder entirely seperate for the new tool (since it assumed an install into the "oracle" folder, which didn't exists) *and* all of the network settings files and mucking-up the whole setup.
I feel this could have been avoided during install if attention were paid more closely to locations. In any event, we needed a quick fix to get the web applications back online and found that there were also some Oracle Installer version issues (the newest one was needed to uninstall the components, but wasn't a part of the actual component installation (apparently)).
To get things back on-track quickly, I went into the Windows Environment Variables to hunt for the path that was causing the misdirection, it was appended right at the end (obviously) in this case...
I removed that path making *very sure* not to remove anything else beyond that. and verified that the old path was still there... Rebooted to ensure any initial path reads would re-occur.. and we were back up-and-running...
Not a beautiful solution, in my humble opinion, but if you are in-need of something to get things back quickly, perhaps give-it-a-go....
(Insert Significant Credentials and Witty Comment Here)