Configuring the ODP.NET Environment
Building .NET Applications Using Oracle Developer Tools For Visual Studio .NET
Configuring the .NET Stored Procedures Environment in Oracle Database 10g
This tutorial describes how to install and configure Oracle
Database Extensions for .NET so that you can deploy and run a .NET Stored Function in Oracle Database 10g.
Approximately 30 minutes
This tutorial covers the following topics:
Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.
With Oracle Database 10g Release 2 on Windows, Oracle now offers Oracle Database Extensions for .NET. This database option makes it possible to deploy stored procedures and functions written in a .NET managed language into the Oracle database on Windows. This database option is not installed by default -- you will need a custom install of the database to enable this option.
Back to Topic List
Before you perform this tutorial, you should:
Back to Topic List
In this topic, you will install the Oracle Database Extensions
for .NET option. Perform the following steps:
| 1. |
For this installation you need either the DVDs or a downloaded version of the DVDs. In this tutorial, you install from the downloaded version. From the directory where the Database DVD files were unzipped, double-click setup.exe.
|
| 2. |
Click Advanced Installation and click Next.
|
| 3. |
For Installation Type, select Custom and click Next.
|
| 4. |
You will install the Oracle Database Extensions for .NET into the existing Oracle Home. Click Next.
|
| 5. |
Scroll down and select Oracle Database Extensions for .NET and click Next.
|
| 6. |
The prerequisites will be evaluated. Click Next.
|
| 7. |
Click Next.
|
| 8. |
Review the Summary window and click Install.
|
| 9. |
The progress window will appear.
|
| 10. |
The installation was successful. Click Exit. Then click Yes.
|
Back to Topic List
In this topic, you will configure your database to use the
Oracle Database Extensions for .NET option. Perform the following steps:
| 1. |
Select Start > Programs > Oracle - OraDb10g_home1 > Configuration and Migration Tools > Database Configuration Assistant.
|
| 2. |
At the Welcome window, click Next.
|
| 3. |
Click Configure Database Options and click Next.
|
| 4. |
Accept the default. Click Next.
|
| 5. |
Select Oracle Database Extensions for .NET and click Next.
|
| 6. |
Click Finish.
|
| 7. |
Click OK to configure your database.
|
| 8. |
The progress window appears.
|
| 9. |
The database was configured successfully. Click No.
|
Back to Topic List
In this topic, you will install Oracle Database Extensions
10.2.0.2.21. Perform the following steps:
| 1. |
From the directory where the ODE files are downloaded,
double-click setup.exe. The Oracle Universal Installer
will start.
|
| 2. |
At Oracle Universal Installer: Welcome page, click
Next.
|
| 3. |
Select Oracle Database Extensions for .NET 10.2.0.2.20
and click Next.
|
| 4. |
You will install the Oracle Database Extensions for
.NET 10.2.0.2.20 into the existing Oracle home. Click Next.
|
| 5. |
Ensure that the components are selected and click Next.
|
| 6. |
Click Next.
|
| 7. |
Review the Summary window and click Install.
|
| 8. |
The progress window will appear.
|
| 9. |
The installation was successful. Click Exit.
|
| 10. |
Click Yes.
|
Back to Topic List
In this topic, you will run the dbmsclr.plb file. Perform
the following steps:
| 1. |
Open SQL*Plus and connect with <sys>/<password>
as sysdba.
|
| 2. |
At the SQL prompt, run the dbms_clr.plb file using the
command @<oracle home>\rdbms\admin\dbmsclr.plb.
|
| 3. |
The function is successfully completed. Exit SQL*Plus
by using the exit command.
|
Back to Topic List
In this topic, you will install ODAC 11g Visual Studio
Tools. Perform the following steps:
| 1. |
From the directory where the ODAC files are downloaded,
double-click setup.exe. The Oracle Universal Installer
will start.
|
| 2. |
At Oracle Universal Installer: Welcome page, click Next.
|
| 3. |
You will install the Visual Studio Tools in a new oracle home. Enter
Odac11g_home1 for the Name and c:\oracle\product\11.1.0\odac
for the Path. Then click Next.
|
| 4. |
Ensure that the components are selected and click Next.
|
| 5. |
Click Next.
|
| 6. |
Click Next.
|
| 7. |
Review the Summary window and click Install.
|
| 8. |
The progress window will appear.
|
| 9. |
The installation was successful. Click Exit.
|
| 10. |
Click Yes.
|
Back to Topic List
You need to make sure the TNSNAMES.ORA and LISTENER.ORA files are set appropriately. Perform the following steps:
| 1. |
Make sure your TNSNAMES.ORA file contains the following entry (this file is located in your <ORACLE_HOME>\NETWORK\ADMIN directory):
ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )
|
| 2. |
Make sure your LISTENER.ORA file contains the following entry (this file is located in your <ORACLE_HOME>\NETWORK\ADMIN directory):
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = c:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = C:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = ORCL) (ORACLE_HOME = C:\oracle\product\10.2.0\db_1) ) )
Note: Your ORACLE_HOME path maybe different.
|
| 3. |
Stop and start the following Oracle Services.
OracleOraDb10g_home1ClrAgent
OracleOraDb10g_home1TNSListener
OracleServiceORCL
|
Back to Topic List
In this topic, you will ensure that the ODP.NET of 2.102.2.20
is added to the Global Assembly Cache (GAC). Perform the following steps:
| 1. |
Select Start > Programs > Microsoft Visual
Studio 2005 > Visual Studio Tools > Visual Studio Tools Command
Prompt. The Visual Studio Command Prompt window will open.
|
| 2. |
Run the following gacutil command: gacutil /l dataaccess.
All the assemblies included in GAC will be listed. Check if the 2.102.2.20
version is listed. If yes, then the installation is complete. Otherwise,
continue to step 3.
|
| 3. |
Move to folder <oracle home>\odp.net\bin\2.x and
run the following gacutil command: gacutil /i Oracle.DataAccess.dll.
The assembly is successfully added to the GAC.
|
Back to Topic List
In this tutorial, you learned how to install and configure the Oracle Database Extensions for .NET option.
Back to Topic List
Move
your mouse over this icon to hide all screenshots.
|