Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

Oracle

Posted Mar 15, 1999

ODBC for Oracle

By DatabaseJournal.com Staff

by Armand Datema

Note: I wrote this article with the help of our DBA, she had some information about this. Unfortunately she didnt know where she got the information from (the internet, a book etc., so if someone recognizes this dont go out shooting me, but let me know and I will give the proper credits.

Armand

In order to use ODBC and Oracle you need to have the Microsft Data Access Components 2.0 installed. If you dont have it yet, it comes with the full NT Optionpack 4 and can be downloaded seperately from Microsoft.

Install the Microsoft Data Access Components 2.0

It is best to choose the full installation, if you however choose the custom installation make sure that you select the following options:

  • ODBC Components
  • OLE DB Components
  • ODBC Driver for Oracle Database
  • OLE DB Provider for Oracle Database
  • Microsoft ActiveX Data Objects

Install Oracle client software and SQL*Net

  1. From the Oracle CD run the setup from the root directory (Note: if you are installing Oracle form a networkl drive, you must "Map a network drive" to install the software)
  2. Select language
  3. Select installation directorie

The software will now be installed and the setup will exit. Start it again and repeat the ebove steps.

  1. Select "Oracle Client Products"
  2. Select "Application User"
  3. Now choose if you want the dodcumentatation to be installed on the Hard Drive or read it from the CD

The setup program will now copy all the files and configure the client software

In order to connect to an Oracle Database using ODBC a valid SQL*NET connect string must be supplied. Unlike the normal ODBC setup for other databses like MS ACCESS you cannot name it directly. You must do this with the "SQL*NET easy configuration", it allows you to create an "alias" that you cna reference in an ODBC DSN to connect to the Oracle Server.

Create a Database Alias

  1. Run SQL*Net easy Configuration
  2. Select "Add Database Alias"
  3. Type in a name for the alias
  4. Select the protocol - usually TCP/IP
  5. Ask your DBA for the name of the server and the database on that server
  6. Specify the host machine(server) and database instance(database)
  7. Confirm the settings and select "Exit SQL*Net Easy Configuration"

Create a System DSN

  1. On the webserver add a new system DSN
  2. Select "Microsoft ODBC for Oracle"
  3. In the "microsft ODBC for Oracle" Dialogue supply the required information. Ask your DBA for the "User Name". "server" is the alias that was created with "SQL*Net Easy Configuration"
Data Source Name MyOracleDSN
Description optional
User Name  (ask your DBA)
Server (SQL*Net Easy Configuration alias)

Leave the options set to their default value.

The ODBC is setup now and you can start writing you asp apps :)




Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM