Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
Need help connecting to Oracle |
|
I need help connecting to Oracle. I'm absolutely new to it.
SA help states that:
 |
 |
Before you can connect to an Oracle database server, you must have Oracle client software installed on the computer running SQL Assistant. The client software must be properly installed and configured. Its network configuration files must include connection settings for any Oracle servers that SQL Assistant will connect to. These files must be located in the ORACLE_HOME directory whose name is referenced by the ORACLE_HOME variable in the system registry. This variable is stored under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
|
The first thing I found on oracle.com referring clients was on this link. Though this might not be the thing help refers to since it also mentions some registry key (HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE) that is definitely not created by the (rather simple) installation process of Oracle Instant Client, which basically doesn't do anything besides making you extract the contents of a zip archive somewhere and manually adding that path to PATH variable.
 |
 |
General Instant Client installation steps are:
1. Download the desired Instant Client packages for your platform. All installations require either the Basic or Basic Light package.
2. Unzip the packages into a single directory such as "instantclient_12_2".
3. Set your environment's library loading path (for example LD_LIBRARY_PATH on Linux, or PATH on Windows) to the directory created in Step 2.
4. Start your application.
|
I'm pretty much stuck here. Any help is appreciated.
|
|
Tue Nov 21, 2017 4:29 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Hi,
Typically you just run the Oracle graphical client installation program that installs the connectivity software, (e.g. Oracle Net8) and Oracle utilities.
Next step is to run Oracle's "Net Configuration Assistant" graphical utility and add named connection to your database. (experienced users may edit tnsnames.ora file directly in Notepad).
Select Local Net Service ...configuration and follow the steps. This will create so called Oracle TNSNAME that contains configuration parameters (much like named ODBC profile)
Once you've done that, in SQL Assistant you chose Oracle database connection type, and enter something similar to what I have on the screenshot below.
Obviously in the connection parameters you change TNS name to what you have choose in the above step, and enter your account credentials.
You can also try using ODBC and ADO.NET methods, but the basic steps are the same. With ODBC you would also need to configure an additional ODBC profile referring to the same TNS Name. Different types of connectivity drivers may have somewhat different behavior in handling different data types and options. You should choose what works best for your needs.
Hope that helps
|
|
Thu Nov 23, 2017 10:33 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Thank you very much, I'm going to give this a try. One thing is certain, the Instant Client downloaded is not the graphical client I'll need. I'll keep searching.
|
|
Thu Nov 23, 2017 10:44 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Instead of using graphical tools, locate TNSNAMES.ORA file and open it in Notepad. Normally this file can be found in %ORACLE_HOME%\network\admin folder.
Add the following to the end of the file, save changes. "sales_svr" in that example is the TNSNAME that you would to enter in the connection dialog in SQL assistant
 |
 |
sales_svr =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.1.155)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=orcl)) |
What you need to replace in this example.
sales_srv - basically how you want to name that conenction
ip address for the server
port if using non-default 1521
servide_name - see your Oracle server configuration or ask server's DBA.
For more info, please see
https://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm#NETRF262
|
|
Thu Nov 23, 2017 11:35 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
New year, new machine, new windows, new SQL Assistant, new issues.
I have a TNSNAMES.ORA set up (supposedly correctly) but when I try to connect to the server, I get an error message.
I've tried to search for it but it isn't really helpful. Most of the stuff I found online either has much more data reported with the error or is seemingly irrelevant. Could you lend some help, please?
|
|
Mon Jan 06, 2020 5:37 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Quick question, are you trying to use 32-bit SASE with 64-bit Oracle client or visa versa?
|
|
Mon Jan 06, 2020 5:15 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
I use x64 SASE whenever I can. I've downloaded both the 32bit and 64bit versions of the Oracle Instant Client to test. They are both at version 19.5.0.0.0.
This is what I've found while experimenting:
1. Az expected neither the 32bit SASE worked with 64bit oci.dll, nor the 64bit SASE did so with the 32bit oci.dll.
2. Using 64bit SASE with 64bit oci.dll yields the error message I posted earlier.
3. Using 32bit SASE with 32bit oci.dll connects successfully.
4. Just out of curiosity I tried using 64bit SASE with 64bit oci.dll from an earlier version of the instant client (12.2.0.0), which also connected successfully.
It seems that only the newest version of the 64bit Oracle Instant Client causes this error message and the 32bit version works. For the time being, it won't be a big problem (I guess), I'm forced to use 32SASE anyway because of the Tasks and Reminders issue.
|
|
Tue Jan 07, 2020 8:57 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
It's very likely that the oci.dll reads wrong tnsnames.ora file or unable to find it.
I doubt it's a version specific issue, but we can't completely ignore that as a factor. Mine was downloaded and installed in November of last year, I assume it's the latest version.
|
|
Tue Jan 07, 2020 2:34 pm |
|
 |
|