Setting-up Oracle Database for .NET development
I recently had to set-up a new development environment for a .NET application consuming an Oracle Database and found out that it wasn’t that easy, so I thought I’d share how I did it.
Warranty
I’m just sharing my config and the way I did it.
SoftFluent cannot be held responsible if something goes wrong or does not work, and no support is provided. It’s neither official documentation nor the only way to do it, I’m just sharing my recipe ![]()
Prerequisites
I downloaded and installed a free Oracle Database Express Edition.
The 11g Release 2 is available here: http://www.oracle.com/technetwork/products/express-edition/downloads/index.html
Yet, in this case I had to install a 10g in 32-bit which can’t be found on OTN anymore…..except on a Japanese OTN page?!!
If you need the Oracle Database 10g Express Edition (x86) as I did here’s the link: http://www.oracle.com/technetwork/jp/database/express-edition/downloads/102xewinsoft-089442-ja.html
Installing the Server
Nothing special here: install OracleXE.exe, keep everything by default:
- installation directory: C:\oraclexe
- default port: 1521
- configure the SYS or SYSTEM account
Once installed, an administration web page should start. Check that everything runs fine, if so, you’re done, now let’s prepare it for the .NET world!
Installing OCI & ODP.NET
Oracle Call Interface (OCI) is the basic and compulsory method to access Oracle using a client. On top of OCI, we’ll need the Oracle Data Access Components (ODAC). Both OCI and ODAC are a set of dlls and that are shipped as a ZIP, available on Oracle’s web site (http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html).
In my case I specifically needed the ODAC1110621Xcopy.zip, in your case just be careful to use an ODAC version matching your Oracle Database version and bitness.
Then here’s how I configured my environment:
- I created a “C:\oracle” just like OracleXE did,
- I extracted the content of my ODAC1110621Xcopy.zip archive in this directory,
- I removed the path “C:\oraclexe\app\oracle\product\10.2.0\server\bin” from my PATH environment variable…
- …and added the “C:\oracle\instantclient_11_1” in the PATH so my OCI dlls are used,
- I copied the Oracle.DataAccess.dll that is in “C:\oracle\odp.net20\odp.net\bin\2.x\” in “C:\oracle\instantclient_11_1”,
- I removed all Oracle.DataAccess.dll from the GAC so I’ll be sure my .NET apps we’ll always use the Oracle.DataAccess.dll they reference,
- I copied the OraOps11w.dll contained in the “C:\oracle\bin” in “C:\oracle\instantclient_11_1”
Installing SQL Developer
- Download SQL Developer from OTN: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
- Extract and place the sqldeveloper directory in “C:\oracle”,
- Launch SQL Developer, and it should run nice & easy
Setting-up CodeFluent Entities
Since we removed Oracle.DataAccess.dll from the GAC, we need to place it in CodeFluent Entities directory so the Oracle Database Producer can access it.
Hope this helps,
Carl Anderson
Share this:
Leave a Reply Cancel reply
Search
Categories
- .NET (2)
- .NET Domain Model (36)
- ASP.NET (30)
- C# (1)
- Cache (1)
- Data access (1)
- Developing Using CodeFluent Entities (138)
- Documentation (10)
- Exploring the CodeFluent Runtime (12)
- Importers (15)
- Links (9)
- MySQL (2)
- News (64)
- Not CodeFluent Related :) (19)
- Oracle Database (31)
- PostgreSQL (2)
- Presentation (63)
- Producers (5)
- ServiceStack (1)
- SharePoint (10)
- SoftFluent Products (16)
- SQL Server (43)
- SQLAzure (39)
- Templates (13)
- Tools (2)
- Uncategorized (2)
- WCF (10)
- Web API (2)
- WPF (10)
Recent Posts
Top Posts
Top Rated
Archives
- May 2013 (3)
- April 2013 (6)
- March 2013 (5)
- February 2013 (4)
- January 2013 (1)
- December 2012 (3)
- November 2012 (8)
- October 2012 (8)
- September 2012 (4)
- August 2012 (7)
- July 2012 (8)
- June 2012 (11)
- May 2012 (4)
- April 2012 (11)
- March 2012 (11)
- February 2012 (12)
- January 2012 (14)
- December 2011 (12)
- November 2011 (16)
- October 2011 (5)
- September 2011 (16)
- August 2011 (15)
- June 2011 (22)
- May 2011 (16)
- April 2011 (11)
- March 2011 (16)
- February 2011 (16)
- January 2011 (14)
- December 2010 (1)
- November 2010 (9)
- October 2010 (1)
- September 2010 (1)
- July 2010 (2)
- June 2010 (2)
- May 2010 (1)
- April 2010 (1)
- March 2010 (2)
- February 2010 (1)
- January 2010 (4)
- December 2009 (5)
- November 2009 (1)
- August 2009 (1)
- July 2009 (1)
- June 2009 (2)