Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Oracle Client Issues


December 7, 1997

Since we are talking Delphi, we will only cover MS Windows issues.

Oracle uses something they call SQL Net to connect to the server. SQLNet is set up to use an installed network protocol and thus isolates this layer from the application. There are, of course, several networking protocols out there and you have to use one that is also set up at the server - the Oracle Listener.

These days Oracle uses TNS (Transparent Network Substrate, what a name!) to ease the setup of SQL Net. In older days (pre SQL Net 2) you had to set everything up manually in files called tnsnames.ora, sqlnet.ora and more in your ORAWINxx\NETWORK\ADMIN directory.

With TNS comes a utility called 'SQL Net Easy Configuration' (That strangely enough runs under the Oracle installer) This allows you fairly simply to set the required parameters. These parameters are the network protocol, the server location, and the TNS Alias.The TNS Alias is then used to make the connection to the database.

The easiest way to check connectivity is to run SQLPlus. SQLPlus prompts you for username, password and host. If your version of SQLPlus is 3.2 or later, you should use a TNS alias as the host parameter. If you have an Alias called 'mydb', you just use this name directly:


  username: scott
  password: tiger
      host: mydb
If you are not using TNS, the host parameter would read something like 't:myserver:orcl' where 't' stands for TCP/IP, 'myserver' and 'orcl' stand for entries in the configuration files mentioned earlier. A more cryptic and direct way could be 't:123.456.678.901:1521', which is slightly less informative.

Note

You should also ALWAYS check that the Oracle Home Directory is defined in your path. This is also true for 32 bit systems. The Oracle Home is usually C:\ORAWIN\BIN for 16 bit and C:\ORAWIN95\BIN for Windows 95, and C:\ORANT\BIN for NT.

A bit more about drivers

SQLNet 1 is used under version 7.1, though you can still access newer versions with this driver.

SQLNet 2 is the thing to use for 7.2 and onward. Keep in mind that SQLNet ver. 1 and 2 support both 16- and 32-bit connections! It is perfectly possible to have both 16- and 32-bit versions installed on a client at the same time. Delphi will only use one of them: version 1 uses the 16-bit driver, while Delphi 2 and 3 use the 32-bit thingies.

Here's a little overview regarding the versions:
VersionDescription
< 7.1This kind of fades in the mist of yesteryear. If you have an older version, I really would consider upgrading.;) And there's nothing on NT, I'm pretty sure.
7.1Not possible to use os_authent_prefix
Uses SQLNet 1 for connection. As far as I remember.
7.2Moved to SQLNet 2, and still accepts pure DOS connections. SQLNet 1 is also OK.
7.3DOS is definately out. SQLNet 1 still works, I think. Now supports return cursors from procedures.
8.0Enter the Hybrid relational/object oriented database. Haven't seen it yet. As far as I know, SQLNet 1 is gone by now.



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use