ora-12154 could not resolve... with oracle instant client - oracle

Here are the details:
I installed the oracle instant client 11.2.0.2.0 from the OTN download page on a windows 7 64 bit vm (vmware).
I am trying to to connect to a remote oracle database, and I can successfully connect with one program using TNS, but not with SQL*Plus and other applications.
Trying to connect with SQL*Plus, using schema#servicename, password, etc, gives the above error.
To connect via SQL Developer, normally I would use the basic connection info and not rely on tnsnames, but trying a normal connection gives me: io error: unknown host specified. SQL Developer can successfully connect and query database if i use the TNS protocol.
Trying from other programs gives me the same error I got with SQL*Plus. Same when trying with the service name from tnsnames.
This is obviously quite frustrating for it to work one way and not the other. I followed all the normal instructions for using the instant client, the directory with instantclient has been addded to the PATH, a TNS_ADMIN entry has also been created, with the directory to the tnsnames.ora file

Well, on a whim, I went to changing everything in my setup to match an windows 2003 server that i had setup with instant client before. The main changes were putting the instant client in a folder at the root of the drive (not program files/oracle/etc), but c:/oracle, i know ive seen other posts saying that oracle was particular about characters in the directory path, maybe spaces are a no-no too?
I also add a bunch more environmental variables, anythign that was on the other machine, ORACLE_HOME (to root of instance), SQL_PATH (same), and added the root of the directory to the PATH system variable, not just the folder with the instantclient files. Anyways, I'm happy its working, anyone one of these changes could have been it though-

You may use ProcessMonitor and look at what your sqlplus process is doing. In my case TNS_ADMIN was correctly defined but, by mistake, my tnsnames.ora and sqlnet.ora had a stupid ".txt" extension, added by default by notepad when I created those files. And because "Windows Explorer" has the "Hide extensions for known file types" option set by default, the naming error wasn't obvious at all.

I installed the 12.1 instant client. For me, the problem was solved by creating \network\admin\tnsnames.ora file. Here's the PowerShell I used:
$source = "C:\Users\USER1\Desktop\tnsnames.ora"
$target = "C:\oracle\product\12.1.0\client_1\network\admin"
mkdir $target
copy-item $source $target

Related

Oracle ODAC 18.3 for Windows Server 2019 Installation Errors

I am trying to install Oracle ODAC 18.3 on a Windows Server 2019 Standard so that I can create a data source connection to an Oracle database from a SQL Server 2019 instance, either by using Polybase or a Linked Server connection. The only components that I need installed are the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP. During the Perform Prerequisite Checks stage of the install, there are errors.
The errors are as follows:
PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ on nodes ""
Please select a different work area for the framework
[hostname] : PRKN-1014 : Failed to execute remote command "C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\\exectask.exe" on node "[hostname]". Failed during connecting to service
[hostname] : Failed during connecting to service
Notes regarding error message above. [username] refers to my username that I am logging in with to Windows. It is an Active Directory account. [hostname] refers to the computer name that I am trying to install ODAC on. Also, I have tried installing this a few different times, all with the same error messages. On the second and third time installing I verified that during the installation the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory is getting created, so this should not be a permissions issue.
In the PRKN-1014 error message, I did notice that there is an extra backslash in the path, CVU_18.0.0.0.0_\[username]\\exectask.exe, so my suspicion is that there is an issue with the installer not being able to identify the correct path to find the exectask.exe. If I traverse to the
C:\Users\[username]\AppData\Local\Temp\CVU_18.0.0.0.0_[username]\ directory I indeed find the exectask.exe file.
I have found a few different solutions online for others that worked for them, but none have worked for me. One solution was to add in the System Environment Variables the _JAVA_OPTIONS variable with a value of -Xmx512M. A second solution was to change the Environment Variables user variables TEMP and TMP to C:\TEMP. Neither of these worked and resulted in the exact same errors. I did in fact confirm that the Oracle Universal Installer extracted the files to the C:\TEMP directory.
Any and all suggestions would be very much appreciated!
I wasn't able to get the Oracle "Universal" Installer to work, like you. However, I was able to install the Oracle Provider for OLE DB and Oracle Provider for OLE DB for OLAP (same as you were trying to get) using the ODAC Xcopy installer.
I downloaded the ODAC Xcopy installer from here:
https://www.oracle.com/database/technologies/dotnet-odacdeploy-downloads.html
After downloading the installer, I ran the install batch file to install those two components. An extra undocumented step is that you must update the PATH environment variable on your system to include your install location and bin folder. In my case, "C:\Oracle" and "C:\Oracle\Bin".

Error- pl/sql developer -12154 tns could not resolve the connect identifier specified

Good Morning. I tell you my connection problem with pl / sql Developer.
First, I will indicate my environment:
-SO Windows10 64 bits.
-PLSQL Developer 13 (64 bit)
-Client Oracle 12-64bits.
Now I put the screenshots of my settings.
But finally the connection error message returns
Cause of this issue would be you tried to connect to Oracle, but the service name is either missing from the TNSNAMES.ORA file or is incorrectly defined.
You can try below options:
Make sure that the TNSNAMES.ORA file exists and is in the correct directory.
Make sure that the service name that you are connecting to is included in the TNSNAMES.ORA file and that it is correctly defined.
Make sure that there are no syntax errors in the TNSNAMES.ORA file. For example, if there are unmatched parentheses in the file (ie: open bracket without the corresponding close bracket), the file will be rendered unusable.
Check if tnsping works. Open command window type tnsping SERVICE_NAME. Here SERVICE_NAME is the oracle database you want to connect to and it must already exist in tnsnames.ora file where your client product is installed.
If tnsping works and still PL/SQL Developer complains about ORA-12154 then check where PL/SQL Developer program is installed. If it is located in an address which contains brackets this is the problem. So uninstall and reinstall it in a location where location address doesn't contain brackets.
set Environment Variables: ORACLE_BASE, ORACLE_HOME, ORACLE_SID
I hope this works with the above options

windows cannot file http port in sql

I have Downloaded Oracle 11g and after installation i am having this problem.
Windows Cannot find path 'http://127.0.0.1:%HTTPPORT%/apex/f?p=4950'. Make Sure you typed the name correctly, and then try agian.

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

Oracle Pro*C ORA-12547

I'm working on re-compiling some Pro*C code that no one currently at my company has ever compiled. It's compiling OK, but when I copy it to the production server and run it I'm getting Oracle error ORA-12547 (TNS: lost contact)
Any ideas?
Oh, figured it out. :-)
The C executable isn't run directly on the server, but launched through a script that sets up the connection environment. i.e. something like this:
export SHLIB_PATH=/oracleDatabaseSidHere/oracle/10.2/lib:/usr/lib:/oracleDatabaseSidHere/oracle/10.2/odg/lib
export ORACLE_BASE=/oracleDatabaseSidHere/oracle
export ORACLE_SID=oracleDatabaseSidHere
export ORACLE_HOME=/oracleDatabaseSidHere/oracle/10.2
# Set up the path and executable to run
PATH=.\:$PATH:$ORACLE_HOME/bin:/usrlocal/bin
PATH=$PATH:/path_to_application_logs
cd /path_to_application
application
Related to this, I just found out that I get the same error ORA-12547 TNS lost contact on my Windows machine when I try to connect to an Oracle database with PL/SQL and at the same time I have a VPN connection open.
I had a similar problem on Linux, Oracle 11gR2. Oracle owner could run SQL*Plus and get in via either TNS or local connection. Non-oracle user could log in via TNS, but not as local connection.
Turns out the answer was that the ORACLE_HOME filesystem was mounted "nosuid". Removing that mount option solved my issue.

Resources