ODBC for Oracle
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. How to use ODBC with Oracle
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
- 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)
- Select language
- Select installation directorie
The software will now be installed and the setup will exit. Start it again and repeat the ebove steps.
- Select "Oracle Client Products"
- Select "Application User"
- 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
- Run SQL*Net easy Configuration
- Select "Add Database Alias"
- Type in a name for the alias
- Select the protocol - usually TCP/IP
- Ask your DBA for the name of the server and the database on that server
- Specify the host machine(server) and database instance(database)
- Confirm the settings and select "Exit SQL*Net Easy Configuration"
Create a System DSN
- On the webserver add a new system DSN
- Select "Microsoft ODBC for Oracle"
- 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|
|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 :)
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...