Product: TIBCO Spotfire®
ORA-12154: TNS:could not resolve the connect identifier specified
The above error could be seen in the Web Player logs while accessing a report that connects to an Oracle data source, on the Web Player. The report will open fine through the Analyst Client.
The error trace seen in the Web Player log will be similar to the one below.
Spotfire.Dxp.Data.Import.DatabaseDataSource;"Failed to open connection, ErrorCode=-2146232008"
System.Data.OracleClient.OracleException (0x80131938): 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 Spotfire.Dxp.Framework.ApplicationModel.Progress.ExecuteSubtask(String title, ProgressOperation operation)
===== To start with, ensure the tnsnames.ora file is correct and the account running the Node Manager service has access to it. "tnsnames.ora" can also be copied from a working environment.
If it still doesn't work, perform the following steps:
- Make sure "TNS_ADMIN" registry key is created at "HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE".
- If it exists, ensure it has the correct value pointing to the Oracle client location. This location is "C:\Oracle\product\12.1.0\client_2\Network\Admin" by default. Copy "tnsnames.ora" file at this location.
- If "TNS_ADMIN" key does not exist, create this key and point it to the same location as above.
Note: In the event of Oracle Client is installed at a non-default location, you may want to uninstall the client and instal it at the default location. By default, the Oracle client is installed under "C:\Oracle\product\". Once this is done, follow the steps :
- Copy the "tnsnames.ora" file to the Oracle client default location that is "C:\Oracle\product\12.1.0\client_2\Network\Admin"
- Change the registry to point "TNS_ADMIN" to "C:\Oracle\product\12.1.0\client_2\Network\Admin"
Screenshot(TNS_ADMIN.JPG) attached for reference.
TIBCO does not provide support for problems that arise from improper modification of the registry. The Windows registry contains information critical to your computer and applications. Make sure you back up the registry before modifying it. For more information on the Windows Registry Editor and how to back up and restore it, refer to Microsoft KnowledgeBase