Installing Oracle Instant Client - oracle

I can't seem to figure out how to install the Oracle client on Windows Server 2008.
I downloaded x64 version (the first file on the list) here. There are installation instructions on the bottom of that page:
Step 2 ("instantclient")
Which executable should I run?

The instantclient works only by defining the folder in the windows PATH environment variable. But you can "install" manually to create some keys in the Windows registry. How?
1) Download instantclient (http://www.oracle.com/technetwork/topics/winsoft-085727.html)
2) Unzip the ZIP file (eg c:\oracle\instantclient).
3) Include the above path in the PATH.
4) Create the registry key:
Windows 32bit: [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
Windows 64bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE]
5) In the above registry key, create a sub-key starts with "KEY_" followed by the name of the installation you want:
Windows 32bit: [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_INSTANTCLIENT]
Windows 64bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_INSTANTCLIENT]
6) Now create at least three string values ​​in the above key:
NLS_LANG = BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252 (complete list here: http://docs.oracle.com/cd/B19306_01/install.102/b14317/gblsupp.htm)
ORACLE_HOME = c:\oracle\instantclient (the same folder in PATH)
ORACLE_HOME_NAME = MY_INSTANTCLIENT (choose any name)
For those who use Quest SQL Navigator or Quest Toad for Oracle will see that it works. Displays the message "Home is valid.":
The registry keys are now displayed for selecting the oracle client:

I was able to setup Oracle Instant Client (Basic) 11g2 and Oracle ODBC (32bit) drivers on my 32bit Windows 7 PC. Note: you'll need a 'tnsnames.ora' file because it doesn't come with one. You can Google examples and copy/paste into a text file, change the parameters for your environment.
Setting up Oracle Instant Client-Basic 11g2 (Win7 32-bit)
(I think there's another step or two if your using 64-bit)
Oracle Instant Client
Unzip Oracle Instant Client - Basic
Put contents in folder like "C:\instantclient"
Edit PATH evironment variable, add path to Instant Client folder to the Variable Value.
Add new Variable called "TNS_ADMIN" point to same folder as Instant Client.
I had to create a "tnsnames.ora" file because it doesn't come with one. Put it in same folder as the client.
reboot or use Task Manager to kill "explorer.exe" and restart it to refresh the PATH environment variables.
ODBC Drivers
Unzip ODBC drivers
Copy all files into same folder as client "C:\instantclient"
Use command prompt to run "odbc_install.exe" (should say it was successful)
Note: The "un-documented" things that were hanging me up where...
- All files (Client and Drivers) needed to be in the same folder (nothing in sub-folders).
- Running the ODBC driver from the command prompt will allow you to see if it installs successfully. Double-clicking the installer just flashed a box on the screen, no idea it was failing because no error dialog.
After you've done this you should be able to setup a new DSN Data Source using the Oracle ODBC driver.
-Hope this helps someone else.

The directions state:
Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic package.
Unzip the packages into a single directory such as "instantclient".
Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used.
Start your application and enjoy.
Suggest extracting/unzipping into a new directory. They've suggested instantclient, but you can name the directory anything you like. Name it C:\OracleInstantClient\ if you choose.
Then in Step 3, open a Windows Command Prompt. Type:
PATH C:\OracleInstantClient; %PATH%`
That's all there is to it!

If you want to use SQL Server Management Studio, you want to install the full Oracle client, not the Instant Client. The full Oracle client is on the same download page as the Oracle database. Assuming that you are installing on a 64-bit version of Windows, I expect you want the "Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64)" download. This is several hundred MB rather than a couple of MB for the Instant Client.

Try SQLDeveloper - there is a migration workbench there
http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html

Related

How can I configure DOS and SQL Developer to use the TNSAMES file I want to use?

I am using SQL Developer to connect to a few Oracle databases on different versions i.e. 18.0.0 and 11.2.0.
I have installed both sets of drivers on my PC. It appears that when I use TNSPING (via a command prompt); it uses the TNSNAMES file in the 18.0.0 folder and when I use the SQL Developer tool (https://www.oracle.com/uk/tools/downloads/sqldev-v192-downloads.html) it uses the TNSNAMES file in the 11.2.0 folder.
How can I configure DOS (TNSPING) and SQL Developer at runtime to use the TNSAMES file I want to use?
I have spent one hour Googling this, but I have not found an answer.
Two platforms, two different answers.
For 'DOS' - or say a command line interface running from the Oracle Client. SQLPlus is set to honor an ENV Var called TNS_ADMIN, but it will also check the ORACLE_HOME/network/admin folder, and it will also check the Windows Registry under HKEY_LOCAL_MACHINE and Oracle, also for TNS_ADMIN.
For SQL Developer, a Java application using JDBC driver, it also tries to honor the TNS_ADMIN environment variable, although it does NOT go into the Windows Registry, looking for known TNSNames.ora files. It will also look in the current folder, or it will look where you TOLD it to look, in the application preferences.
You can see for yourself where SQL Developer is looking, but running this command through the script engine (F5) -
show tns
This will show you what files we've found and are using, in addition to the first dozen or so services.
TNS Lookup locations
--------------------
1. USER Home dir
C:\Users\jdsmith
Location used:
-------------
C:\Users\jdsmith
Available TNS Entries
---------------------
LISTENER_ORCL12C
ORCL
ORCL12C
If you want to tell SQLDev which tnsnames to use, look at the perferences
If you google 'tnsnames sql developer' the first couple of hits are StackOverflow questions that already cover this, and the 3rd one is to my blog.

Need help installing ODAC 122011x64 so I can connect ADW to Power BI

So I have successfully installed Oracle DB 19c and connected it to Oracle SQL Developer. I am able to create tables and run queries. Furthermore, I can connect to ADW with both python and SQL Developer and any changes that I commit are seen in all locations. I am trying to connect the ADW database to Power BI. I am running all this on a personal Windows 10 Pro laptop with plenty of SSD & RAM.
In a new window of Power BI I click Get Data and then Oracle Database followed by Connect. When I do this I get a pop up that says:
The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work correctly.
I clock OK. Enter my Server as the TNS Name that I have used for my python and SQL Developer instances. In my ADW database, I have a table called TEST. It's a simple table with 1 column with the years 2015 through 2020 in it. Been using this to test to see if things are working. So I click on the DirectQuery and run the SQL statement SELECT * FROM TEST under the Advanced options menu and select OK. A sign in window pops up and I select the Database table and enter my correct ADW username and password. The same one that I can use to access this table from SQL Developer and then select Connect. When I do, I get this error:
Details: "The provider being used is deprecated: 'System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.'. Please visit https://go.microsoft.com/fwlink/p/?LinkID=272376 to install the official provider."
So I go to the website and download the ODAC122011_x64 file from Oracle and unzip it. When I double click the setup.exe file inside the directory I get a yes/no user control account menu and I select yes and then a command prompt window flashes very quickly and then nothing happens. I ran a super slow motion capture from my phone to capture what the command window showed and below is what I see:
Starting Oracle Universal Starter...
Checking monitor: must be configured to display at least 256 color Higher than 256 . Actual 4294967290 Passed
Preparing to launch Oracle Universal Installer from C:\Users\<my username>\AppData\Local\Temp\OraInstall2020 09:20_09-04 {???}
Please wait .._
It does nothing after this I have tried running the oui.exe file under the install subdirectory and get nothing and I have tried running the install.exe file in Oracle Universal Installer that I acquired when installing Oracle DB 19c and I get the following error when I target the install.exe file for installation:
OUI-10118:C/Users/{my username}/Downloads/ODAC122011_x64/Setup.exe is either a directory or a corrupt file. Specify a valid filename.
This is a file that I just directly downloaded from Oracle's website and unzipped to a directory with no spaces in the directory location. I have the latest version of Java installed (JDK 15).
I am not sure the proper work around here. Why can't I get my Power BI to connect to my Oracle ADW table using the methods described in this article. Those are the instructions that I used. It appears that I need this ODAC application but I don't understand why it won't install.
Can anyone help me resolve this issue? Thanks!
Edit: I am using 64-bit on each application.
Update: Still having issues. I checked the log and this is what I am seeing:
Using paramFile:
C:\Oracle\Oracle_PowerBI_ODAC\ODAC122011_x64\install\oraparam.ini
Checking monitor: must be configured to display at least 256 colors. Actual 4294967296 Passed
The number of files bootstrapped for the jre is 0.
The number of files bootstrapped for the oui is 0.
the client version need not match the server version, Removing all other versions, and making sure that I had the x64 version,
You need the latest ODP.net library to use Oracle. Please download it here:http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
I figured out the solution after reviewing this post. Apparently having over 2TB of free space on a hard drive causes this problem. You have to go into command prompt and create a temporary file to get your free space under 2TBs using something like this:
fsutil file createnew temp_1TB_file 1200000000000
Run the setup.exe again and then delete the temp file after.
Update: After doing all this I still was running into the same issues in Power BI. Then I read the troubleshooting notes from this page more closely and realized that I might have found the problem when it said:
If you downloaded Power BI Desktop from the Microsoft Store, you might be unable to connect to Oracle databases because of an Oracle driver issue.
I uninstalled the PowerBI Desktop that I had installed from Microsoft Store and installed it from the download from its website and tried connecting to Oracle ADW again through PowerBI and IT WORKED!!! So much troubleshooting but it finally works!

PL/SQL Developer Initialization error

I want use PL/SQL Developer
first my oracle directory
C:\oracle\product\10.2.0\client_1\BIN
I use windows10 and environment variable setting
ORACLE_HOME C:\oracle\product\10.2.0\client_1
Path C:\oracle\product\10.2.0\client_1\BIN
but execute Initialization error.
Initialization error
Could not load "C:\oracle\product\10.2.0\client_1\bin\oci.dll"
OracleHomeKey: SOFTWARE\ORACLE\KEY_OraClient10g_home1
OracleHomeDir: C:\oracle\product\10.2.0\client_1
Found: oci.dll
Using: C:\oracle\product\10.2.0\client_1\bin\oci.dll
LoadLibrary(C:\oracle\product\10.2.0\client_1\bin\oci.dll) return 0
download oracle instant client (64 bits for latest version of PL/SQL; 32 bits for old version)
extract to a folder. for example: c:\oracle\instantclient
open PL/SQL developer--> Configure--> Preferences --> Oracle Connection
under OCI library, keyin OCI.DLL file path in the text box: c:\oracle\instantclient\oci.dll
click OK and restart PL/SQL
I meet the same error on my new windows 10 computer. At last i found that i missed the Microsoft Visual Studio 2013 Redistributable. After i install it, the error gone.
I was getting below error while connecting to database from PL/SQL developer (in windows10 64 bit).
Initialization error
Could not initialize
"C:\app<username>\product\12.2.0\dbhome_1\bin\oci.dll"
Make sure you have the 32 bits Oracle Client installed.
OracleHomeKey:
OracleHomeDir: C:\app\<username>\product\12.2.0\dbhome_1
Found: oci.dll
Using: C:\app\<username>\product\12.2.0\dbhome_1\bin\oci.dll
LoadLibrary(C:\app\<username>\product\12.2.0\dbhome_1\bin\oci.dll)
return 0
To resolve this issue, refer to the below documentation provided by Oracle to install the Oracle Instant Client. If your windows is 64 bit, then download the 32 bit Oracle Instant Client from below link -
Oracle guide
Link to download the Oracle Instant Client - (Download the BASIC and SDK and SQL*Plus Package)
Take all the above three packages in one directory and extract the same and add the path of extracted directory in system environment variable PATH and OCI_LIB32.
If OCI_LIB32 is not present then create the same.
Try to connect to database from PLSQL developer, if you getting error as 'ORACLE initialization or shutdown in progress' then go through the below link
Good Luck :)
Check Environment Variables %PATH%
I had the similar problem and these steps did helped me
steps:
Download oracle instant client (64 bits for latest version of PL/SQL; 32 bits for old version)
Extract to a folder. for example: c:\oracle\instantclient
Open PL/SQL developer--> Configure-->Preferences--> Oracle Connection
Under OCI library, keyin OCI.DLL file path in the text box: c:\oracle\instantclient\oci.dll
Click OK and restart PL/SQL
done
Most of the cases this happens
If you dont have any oracle client
In this case, you can download instant client and put it in C drive, then copy the path of the oci.dll file path and put it in the OCI library text field in the PL SQL Dev config option
If you have multiple oracle home
If you have multiple homes reflecting, then check the correct oracle home from the Oracle Home drop down in PLSQL Dev config option.
Attached the image of the config screen for easy reference.
Download oracle client after that use PL/SQL to connect

SQLPLUS does not run using oracle instant client on win XP SP3

I have a computer which acts as a server for Oracle database 11g Enterprise. I want to use another computer, a PC that is running Windows XP SP3, as a client of this server.
So I decided to install Oracle Instant Client 11.2.0.4.0 on client PC. I downloaded zipped file from Oracle OTN and extract it into folder like c:\oracle\instantclient11.2.0.4.0. Then I added this path to the system path variable, and created another system variable called TNS_ADMIN for variable name with the same path for Oracle Instant Client, c:\oracle\instantclient11.2.0.4.0 .
Finally I copied the tnsnames.ora from server pc.
So I want to try to run the sqlplus from cmd.exe but the error is :
The procedure entry point OCIBindByName2 could not be located in the dynamic link library OCI.dll .
Can anybody help me?
Have you set ORACLE_HOME to c:\oracle\instantclient11.2.0.4.0 too?
It should be fixed in 11.2 though as descibed in 343666.1 :
This dependence on ORACLE_HOME issue has been resolved in Bug: 5532439
OCI.DLL MUST APPROPRIATELY CALL SETDLLDIRECTORY. The fix is to call
SetDllDirectory based on the location of where the OCI.DLL is located.
Workaround for this issue:
Do an Instant Client Installation, for example into, C:\Oracle\EZClient102
Set the ORACLE_HOME environment variable to the ORACLE_HOME of the Instant Client.
set ORACLE_HOME=C:\Oracle\EZClient102
Then the Instant Client DLL's should be loaded from
C:\Oracle\EZClient102\bin

How to change the Oracle Client user in a connection

I have the oracle 10 and 11 clients instaled in my machine. When i go to the command line and type TNSPING the output tells my something like this
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-OUT-2012 09:34:39
so, i assume that this machine is using the 10 version of oracle client to handle the connections.
How to change it?
If you go to a command line and type "tnsping" on a Windows machine, whichever Oracle Home is listed first in your PATH environment variable will be the Oracle Home that is used. If you want the 11g Oracle Home to be the default, you can edit the PATH environment variable (Control Panel | System | Advanced | Environment Variables) and move the 11g Oracle Home path ahead of the 10g Oracle Home path. Alternately, you should be able to open the Oracle Universal Installer from the 11g install and use the Oracle Home selector that is in that utility to change the order of the paths in your PATH environment variable. Behind the scenes, that tool is just rearranging the directories in your PATH.
Whether the default Oracle Home is being used by a particular application, though, is a somewhat different matter. Some applications are set up to use whichever Oracle Home happens to be the default. Other applications can make use of components installed in the non-default Oracle Home. Since you tagged this question ODP.Net, I assume that the application(s) you are actually concerned about are using ODP.Net. If that's the case, you probably want to look through the ODP.Net FAQ where it discusses using ODP.Net on a client with multiple Oracle Homes.
Exactly for the same reason I have made the following tool:
http://oratools.codeplex.com/wikipage?title=Oracle%20Home%20Selector&referringTitle=Home
it searches for oracle clients installed on machine, and allows to switch current oracle home by modifying registry, environment variables and registered libraries

Resources