Monday, July 06, 2009

 

Microsoft Deprecates OracleClient: Time to Consider Moving to ODP.NET

Microsoft recently announced that it will deprecate Microsoft System.Data.OracleClient. For existing Microsoft OracleClient developers, especially those that haven't taken a look at the Oracle Data Provider for .NET (ODP.NET) in some time, this is a good time to look at ODP.NET again for new development or to migrate existing Oracle .NET applications. In recent years, ODP.NET has added lots of new features -- such as performance tuning, user-defined types, advanced queuing, RAC connection pooling, and supporting multiple ODP.NET client versions simultaneously on the same machine.

Alex Keh, who is the product manager for ODP.NET, has put together a special new webhome for developers using OracleClient...its called ODP.NET for Microsoft OracleClient Developers. This web page provides good information about why developers choose to migrate from ODP.NET from Microsoft OracleClient. Alex told me that the page will also provide a step-by-step Microsoft OracleClient to ODP.NET migration tutorial in the near future, which should be extremely useful. If you have questions about what this deprecation means for your company, please contact Alex over at alex.keh [at] oracle [dot] com or post to the ODP.NET Forum (OTN registration required).

In reading various comments on the MSDN post and elsewhere, I noticed a few misconceptions about ODP.NET that I would like to clarify:

Misconception: "This deprecation means I have to pay for an Oracle provider now!"
Fact: ODP.NET is free! You don't need to pay for a third party provider if you don't want to

Misconception: "I have to download a particular version of ODP.NET depending on the version of my database."
Fact: Any version of ODP.NET works with any version of Oracle Database. So you can use the latest version (currently 11.1.0.7) and use it against a 9.2, 10, or 11g database!

Misconception: "I'll have to use the Oracle installer when I deploy my app. Argh!!!"
Fact: At deployment time, you don't have to use the Oracle installer to install ODP.NET if you don't want to. If you so choose you can write your own installer, using scripting or Installshield or whatever you want. All you need to do is download the XCOPY version of ODP.NET. As a bonus, it has a smaller footprint too!

Misconception: "If I need to standardize on/test different apps with different versions of ODP.NET I'm in big trouble!"
Fact:Multiple versions of ODP.NET can live on the same box and your application can target whatever specific one it was tested with. Not everyone has multiple apps that have been tested with different versions of ODP.NET but it happens.

Misconception: "I hit a bug in ODP.NET 9/ODP.NET 10! I can't use ODP.NET because of it!"
Fact: If you hit some nasty bug of some sort with ODP.NET 9 or even 10, make sure to download the 11.1 version and try it as the bug is likely fixed in the years that passed. Again, it does not matter what version of the database you are using, the 11g ODP.NET version will work against them all and over the years we have added tons of new features and bug fixes.

So again, please check out the ODP.NET for Microsoft OracleClient Developers webpage. I'll blog again when the migration step-by-step guide is posted there, so feel free to subscribe to my blog to get an alert when that happens!

Happy coding :)

Labels: , , , , ,


Tuesday, September 16, 2008

 

.NET and Windows OpenWorld Sessions Filling Up Fast!

Summary: Seats are filling up fast for Oracle OpenWorld .NET and Windows sessions, so use Schedule Builder and reserve a seat for yourself today!

Oracle OpenWorld will be taking over the city of San Francisco next week (September 21-25th). And once again we bring back the popular "Oracle Develop", a special 2 day intensive track of content created specifically for the Oracle developer - including a .NET developer track.

This years Oracle Develop .NET track will provide comprehensive coverage of Oracle's .NET technologies including new Oracle Database 11g features, introductory material, and deep dive content. Oracle Develop is perfect for all levels of Oracle on .NET developers, from beginner to advanced. In addition to sessions we also have a .NET Hands on Lab, which lets you get your hands dirty and take Visual Studio 2008 for a joyride! Mark Williams, the author, .NET guru and OTN "Ace Director" who has probably answered one of your questions over at the ODP.NET Forum, will be on hand with me at the hands on lab to take your questions.

Once you register, I strongly urge you to use Schedule Builder to reserve seats in the sessions you are most interested in. I recommend doing so as many of our .NET and Windows sessions look like they are getting close to capacity.

If you can't make it to Oracle Develop content this year, please visit us in the Exhibition Hall (in the database area) for your own personalized demo of our latest features from an Oracle expert.
The .NET booth is booth L41 and Windows database booth is L19.

Oracle Develop .NET Sessions at a Glance

Windows Database Sessions


Thursday, June 05, 2008

 

Join Oracle at Microsoft Tech·Ed in Orlando

Oracle is once again sponsoring Microsoft Tech·Ed (happening now through June 13 in Orlando, FL). We hope to see you there!

Microsoft has split the convention into two parts this year - a Developer week (happening right now), and an IT week (next week). Oracle will be present during both weeks, with a "Birds of a Feather" (BOF) session being hosted by Alex Keh (Oracle) tomorrow, and we'll have a large presence in the Expo hall next week during the IT part of the show. If you are in Orlando right now for Developer Week, I highly recommend you drop by the .NET BOF session as they have been very lively and informative and fun in past years! For those of you attending the IT show, please drop by our demo booth to get your questions answered and see your own personal demo of Oracle technologies. We'll also have a BOF session during IT week entitled "Managing a Mix of Oracle and Microsoft SQL Server Databases"

Here are the details:

Using Oracle with .NET - Birds of a Feather Session:
Hosted by Alex Keh, Oracle
When: This Friday, June 6 10:15 am
Where: Room S330E
Check online to verify room and time
What: Discuss tips and tricks on developing .NET applications with Oracle databases on topics, such as ASP.NET providers, best practices, and comparing available providers. Learn about the latest Oracle features for Microsoft Visual Studio 2008 and the Microsoft .NET Framework 3.5. Ask Oracle and .NET experts your most pressing questions.

Expo Hall

When: IT Week (June 10-13)
Where: Oracle booth (#1408)
What: Get custom demonstrations of the latest Oracle .NET, database clustering and tools, server management, and application server technology for Windows developers and administrators. Learn about Oracle Database 11g and its integration with new Microsoft technologies, such as Visual Studio 2008 and WIndows Server 2008. Enter to win an iPhone!

BOF: Managing a Mix of Oracle and Microsoft SQL Server Databases
When: Wednesday June 11? (check schedule for date, time, and location)

Hope to see you there!!!

Tuesday, October 23, 2007

 

Oracle Database 11g for Windows now available

Download Oracle Database 11g on Windows!

We'll be talking about Windows specific 11g new features at Oracle OpenWorld sessions so reserve your seat today!

Monday, October 22, 2007

 

Reserve your .NET and Windows OpenWorld Sessions Today!

Summary: Seats are filling up fast for Oracle OpenWorld .NET and Windows sessions, so use Schedule Builder and reserve a seat for yourself today!

Oracle OpenWorld will be once again taking over the city of San Francisco from November 11-15. It promises to be a truly amazing experience with over 1,600 sessions covering the full breadth of Oracle's offerings.

As you may recall, last year at OpenWorld we introduced "Oracle Develop", a special 2 day intensive track of content created specifically for the Oracle developer - including a .NET developer track. Well, it turned out to be so tremendously popular in San Francisco that we took the Oracle Develop show on the road to Korea, China, India, Germany, the Czech Republic, and the UK. Now we are back in San Francisco, having learned a lot about what you want in your sessions and we are offering even more of the good stuff that developers can use on their job!

This years Oracle Develop .NET track will provide comprehensive coverage of Oracle's .NET technologies including new Oracle Database 11g features, introductory material, and deep dive content. Oracle Develop is perfect for all levels of Oracle on .NET developers, from beginner to advanced. In addition to sessions we also have a .NET Hands on Lab, which lets you get your hands dirty and take Visual Studio for a joyride! You can attend Oracle Develop if you register for the full conference badge of course, but you could also sign up specifically for Oracle Develop.

Once you register, I strongly urge you to use Schedule Builder to reserve seats in the sessions you are most interested in. I recommend doing so as many of our .NET and Windows sessions look like they are getting close to capacity.

If you can't make it to Oracle Develop content this year, please visit us in the Exhibition Hall (in the database area) for your own personalized demo of our latest features from an Oracle expert.

Oracle Develop .NET Sessions at a Glance

Windows Database Sessions





See you there!

Sunday, June 03, 2007

 

New Oracle and .NET beta available now!

A major beta release is available now for ODP.NET as well as Oracle Developer Tools for Visual Studio .NET. This 11g beta release also marks the first release of a new product, Oracle Providers for ASP.NET. I've written a new white paper (with lots of screen shots) that illustrates the new Visual Studio enhancements. Keep an eye on this blog in the weeks ahead as I will be writing articles explaining how to take advantage of some of the new features such as ASP.NET code generation and User-Defined Type (UDT) support...

We also have some new Oracle by Example walkthroughs that can help get you started:
Oracle by Example: Building ASP.NET Web Applications with ODT
Oracle by Example: Building .NET Applications Using ODT

Here's a summary of the new features:

Oracle Developer Tools for Visual Studio .NET New Features:

  • Visual Studio 2005 integration with Server Explorer, Data Sources Window, Dataset Designer, TableAdapter Configuration Wizard and more
  • Improved ASP.NET web developer support
  • Oracle Database script project to provide source control of Oracle scripts
  • SQL script editor
  • Built in support for executing SQL*Plus scripts
  • Explain plan support
  • Integration with Query Designer
  • New designer for granting/revoking privileges on schema objects
  • User-Defined Types: Create, explore, modify UDTs; custom class code generation for .NET applications
  • Data Window and Query Window enhancements


  • Oracle Data Provider for .NET:

  • Instant Client Support: Smaller ODP.NET client installation
  • User-Defined Types: Map Oracle objects and collections to .NET custom types and support REFs to object types
  • Process Database Down Events: ODP.NET automatically frees connections of a downed Data Guard instance
  • Windows-Authenticated User Connection Pooling: Windows-authenticated connections can now be pooled.
  • Connection Pool Performance Counters: Monitor connection pool status

  • Oracle Providers for ASP.NET:

  • Membership Provider: Stores and retrieves registered user information in the Oracle database
  • Role Provider: Stores and retrieves user role information in the Oracle database
  • Site Map Provider: Stores and retrieves site map information in the Oracle database
  • Session State Provider: Stores and retrieves session state information in the Oracle database
  • Profile Provider: Stores and retrieves user profile information in the Oracle database
  • Web Events Provider: Stores and retrieves ASP.NET health monitoring event information in the Oracle database
  • Web Parts Personalization Provider: Stores and retrieves personalization data in the Oracle database
  • Cache Dependency Provider: Automatically invalidates ASP.NET cached data based on changes made to the base data in the Oracle database

  • Tuesday, May 22, 2007

     

    Oracle and .NET at Tech·Ed Orlando

    Oracle will once again have a major presence at Tech·Ed this year (June 4-8).

    Be sure to stop by the Oracle booth on the demogrounds floor (aka "Partner Expo") for your own personalized demo of Oracle products. We will have demonstrations for Oracle and .NET, Grid Control, RAC, and App Server.

    At the .NET demo station you can get the first look at the upcoming release of the ODAC 11g beta including the following new features:

    ODT:
    Visual Studio 2005 integration with Server Explorer, Data Sources Window, Dataset Designer, TableAdapter Configuration Wizard and more
    Improved ASP.NET web developer support
    Oracle Database script project to provide source control of Oracle scripts
    Integration with Query builder and Query Designer
    User-Defined Types: Create, explore, modify UDTs and custom class code generation for .NET application
    and much more.....

    ODP.NET
    Instant Client Support: Smaller ODP.NET client installation
    User-Defined Types: Map Oracle objects and collections to .NET custom types and support REFs to object types
    and much more...

    ASP.NET Providers

    Sessions:

    We have a "Bird of a Feather" session, which is not a formal presentation, but more of a discussion with Oracle staffers and your fellow Oracle and .NET developers and DBAs. Come prepared with questions and bring your laptop if you feel like turning it into an installfest!

    BOF01: Using Oracle with .NET
    Monday, June 4, 2007 at 10:30 AM
    Room S331 A

    We are also co-presenting a "chalk talk" with Microsoft:

    DAT04-TLC - ADO.NET Entity Framework: Provider Model and Integration with Third-Party Databases
    Friday, June 8 1:00 PM - 2:15 PM, Blue Theater 12

    See you in Orlando!


    Sunday, May 06, 2007

     

    ODP.NET/ODAC for Vista now available

    Coming right on the heels of Friday's release of Oracle Database for Windows Vista, we now have released ODAC 10.2.0.2.21 which is certified for Vista. You can download it here. This release is key because the Oracle Database on Vista downloads announced on Friday only include ODP.NET for .NET 1.x. If you need ODP.NET for .NET 2.x on Windows Vista, or any other of the ODAC products, you will need to download this. It includes all of the ODAC products, including ODP.NET and Oracle Developer Tools for Visual Studio .NET packaged up with a new version of the Oracle installer that is Vista friendly. Only the installer has been upgraded, not the individual ODAC products, so if you are using ODAC 10.2.0.2.20 on another Windows platform, you don't need to upgrade.


    The download includes:
    Oracle Developer Tools for Visual Studio .NET 2003 10.2.0.2.20
    Oracle Developer Tools for Visual Studio 2005 10.2.0.2.20
    Oracle Data Provider for .NET 1.x 10.2.0.2.20
    Oracle Data Provider for .NET 2.0 10.2.0.2.20
    Oracle Database Extensions for .NET 2.0 10.2.0.2.20
    Oracle Database Extensions for .NET 1.x 10.2.0.2.20
    Oracle Provider for OLE DB 10.2.0.2.20
    Oracle Objects for OLE 10.2.0.2.20
    Oracle Services for Microsoft Transaction Server 10.2.0.1.0

    Friday, May 04, 2007

     

    Oracle Database on Windows Vista now available!

    The 32-bit Oracle Database 10g Release 2 for Windows Vista (v. 10.2.0.3) is now available for download! It supports Vista Business, Ultimate and Enterprise Edition.

    Developers who just need the 32-bit Oracle Client for Vista can download it at that same link. This client release is much easier to install than the previous "start at 10.2.0.1 and patch up to 10.2.0.3" method that I blogged about earlier, and it doesn't require that you have access to a Metalink account (to get the patches) if you just want to evaluate the software.

    And as I mentioned in that prior blog entry, Oracle Database Express Edition has been certified on Vista for some time now.

    Some information about Oracle on 64-bit Windows Vista can be found at the Oracle Database on Windows Vista: Statement of Direction.

    Happy installing! :)

    Monday, April 09, 2007

     

    Oracle Develop is coming to Europe and Asia! Sign up now!

    Following up on the tremendous success of our San Francisco Oracle Develop conference, we are bringing Oracle Develop on the road to Europe and Asia in May and June. We will have in-depth technical sessions as well as hands on labs where you can get your hands dirty with the latest and greatest Oracle products.

    Click here to go to the main Oracle Develop web page to read more and to sign up.

    Here's are some of the planned .NET sessions:
    Getting Started with Oracle and .NET
    New Features in Oracle Database 11g for .NET Developers
    PL/SQL Programming for .NET Developers: Tips, Tricks, and Tools
    Best Practices for .NET Developers
    Hands-on Lab: Building .NET Applications with Oracle


    There will also be many sessions on Enterprise Java, SOA, Databases and PL/SQL, as well as Ajax, PHP, Spring, and more.

    Dates and locations:
    May 14-15 Seoul, Lotte Jamsil
    May 17-18 Bangalore, The Grand Ashok
    May 22-23 Beijing, China World Hotel
    June 18-19 Munich, Arabella Sheraton
    June 21-22 Prague, Prague Conference Center
    June 26-27 London, ExCeL


    Here's a couple photos I took at the San Francisco Oracle Develop .NET Hands on Lab, showing some pretty intense learning going on!





    See you there!

    Thursday, April 05, 2007

     

    Learn about .NET and Oracle at Collaborate07 in Las Vegas

    The International Oracle Users Group (IOUG) will hold its Collaborate 07 conference in Las Vegas (April 15-17). If you attend, be sure to check out the .NET session and demonstration kiosk to hear more about new .NET features for Oracle Database 11g.

    Session: Oracle Database 11g: What's New for Java, JDBC, .NET, PHP, and OCI

    This session will be hosted by myself and Kuassi Mensah.

    We will also have a "Application Development Tools" booth in the exhibit hall where you can see demos of Oracle Developer Tools for Visual Studio .NET, ODP.NET and .NET Stored Procedures in Oracle, SQL Developer, Application Express, and JDBC.

    Exhibit Hall: Oracle Database 11g - Application Development Tools booth (DB-007)

    See you there!


    Monday, February 05, 2007

     

    Getting Ready for Windows Vista

    The Oracle Database on Windows Vista Statement of Direction is now up on OTN and it provides time frames for the planned releases of Oracle Database on Vista.

    EDIT (5/4/07): The 32-bit Oracle Database 10.2.0.3 as well as Oracle Database XE are now certified on Windows Vista. The 32-bit Oracle Client is now packaged up in a simple single install so you don't need to patch your way from 10.2.0.1, nor will you need access to Metalink. Read my recent blog entry for more details. The text in the blog entry below was an unsupported "hack" that you won't need to use anymore. If you do decide to apply the 10.2.0.3 patch instead of downloading the whole 10.2.0.3 client from OTN, please follow the installation instructions in the 10.2.0.3 patch release instead of the instructions below.

    Prior to those release dates, many developers who support Windows clients (.NET, ODBC, OLEDB, OO4O etc) will want to get a head start and do some testing of their applications. Unfortunately, the 10.2.0.1 Oracle Installer (the one on all the CDs) will not run properly on Vista. But there is a way you can get around this. It's a bit of convoluted hack, and none of this is supported officially, but it should help you get started testing.

    The gist of it is: The installer that is included with the 10.2.0.3 patchset DOES work on Vista and must be used to first install the 10.2.0.1 Oracle Client software, and then used to upgrade to the 10.2.0.3 Oracle Client. The upgrade to 10.2.0.3 is required because there are a few other Vista related fixes in the 10.2.0.3 patchset.

    The following instructions explain how to do this:

    1) Obtain 10.2.0.1 client CD or zip file (from OTN)
    2) Download the 10.2.0.3 Oracle patchset for 32-bit Windows from Oracle MetaLink and unzip it. (https://metalink.oracle.com/)
    3) Change directory to the 10.2.0.3 Disk1\install directory, open oraparam.ini using notepad (or any editor) and comment out the line "SOURCE=../stage/products.xml" by adding a # to the beginning of this line.
    4) Run setup.exe from 10.2.0.3 Disk1 directory, point to the 10.2.0.1 CD location's products.xml file and proceed with install of 10.2.0.1.
    5) The pre-requisite check will fail. This is expected. Click in the boxes next to the errors. This will change them to say "User Verified." Then click "Next" to continue.
    6) Once 10.2.0.1 has been installed as above, uncomment the "SOURCE=../stage/products.xml" line in Disk1\install\oraparam.ini file in 10.2.0.3 patchset
    7) If you wish to test "ODP.NET for .NET 2.0 version 10.2.0.2.20", you will need to download and install ODAC from OTN at this point, since only "ODP.NET for .NET 1.1" is included in the 10.2.0.3 patch.
    8) From the 10.2.0.3 directory, run Disk1\setup.exe and upgrade the 10.2.0.1 install to 10.2.0.3

    That's it! Er, well of course that's just the start. Now you proceed to test your application!

    I can sense a veritable storm of blogging coming up in my near future, so stay tuned!

    Tuesday, November 14, 2006

     

    Which source control system are you using?

    As part of our planning for our next release of the Oracle Developer Tools for Visual Studio .NET, we'd like to know which source control system(s) your company currently uses.

    I'm running an informal poll over at the ODT OTN Forum... please click through that link and let me know which source control system you are using! Thanks!

    Thursday, November 02, 2006

     

    OpenWorld .NET Slides, Source Code, 64-bit ODP.NET and 64-bit .NET Stored Procedures

    It's been a very busy news week! As promised, here are all of the .NET and Windows OpenWorld slidedecks and sourcecode including the .NET and Oracle Hands on Lab.

    Another big piece of news: we just released the beta of the 64-bit ODAC (for both x64 and Itanium). I know many of you have been waiting for this! This includes the 64-bit Oracle Data Provider for .NET as well as support for .NET Stored Procedures with Oracle Database 10g for 64-bit Windows.

    Have a look and tell us what you think!

    Tuesday, October 31, 2006

     

    Join us at Microsoft TechEd Europe and UKOUG

    Oracle is once again a platinum sponsor of Microsoft Tech·Ed Europe (Barcelona, November 7-10) and we will be demoing our latest features integrating with Microsoft Windows and .NET. If you are attending, be sure to drop by the Oracle booth for a demonstration and attend an Oracle session.

    Session
    Developing and Optimizing .NET Applications for Oracle 10g
    Presenter: Alex Keh
    Thursday November 9th from 15:45-17:00

    Oracle Booth Demos
    Oracle Developer Tools for Visual Studio .NET
    ODP.NET
    .NET Stored Procedures
    Oracle Database on Windows
    Grid Control for Microsoft Servers
    Application Server For Microsoft Servers

    UKOUG
    Alex will also be presenting at UKOUG (Birmingham, November 14-17) . His talk is on Tuesday November 14th at 11am:
    .NET and Oracle Best Practices: Performance, Deployment and PL/SQL Tips

    Other Windows related sessions you should check out:
    Oracle 10gR2 RAC on Windows Server 2003 x64: Best Practices, Tuning and Administration
    Apples and Oranges - Comparative Performance Studies on Linux and Windows

    I also happened to notice some cool SQL Developer and Application Express sessions hosted by Oracle engineering staff:
    SQL Developer: Using Oracle's Graphical Database Development Tool (Wed Nov 15th, 16:35)
    An Insight into SQL Developer and Application Express (Thur Nov 16th 9am)
    Oracle Application Express: Features, Futures and Customer Tales (Thurs 10:20)

    My next post will include slides and code from Oracle OpenWorld, so stay tuned!!!

    Tuesday, October 10, 2006

     

    Debugging PL/SQL from ASP.NET and Visual Studio

    Lots of you are using ASP.NET and the Oracle Data Provider for .NET to create web applications that access Oracle. When those applications call a PL/SQL stored procedure, wouldn't it be great to just step right into the PL/SQL and begin debugging with the live parameter values still intact?

    As mentioned in my earlier blog entries, we now have a fully integrated PL/SQL debugger built right into Visual Studio which is included with the free Oracle Developer Tools for Visual Studio .NET (ODT).

    Today I will explain how to configure Visual Studio and your ASP.NET project to get started debugging your PL/SQL stored procedures, functions and triggers from ASP.NET.

    Background

    Before I start - a brief word about the way Oracle's PL/SQL debugging architecture works. When you connect from any Oracle 9.2 or later client application, Oracle's client libraries check to see if a ORA_DEBUG_JDWP environment variable is set. If it is, the client passes this environment value along with the connect information (eg Oracle user/pass) to Oracle. This ORA_DEBUG_JDWP variable is set using the following format:

    SET ORA_DEBUG_JDWP=host=hostname;port=portnum

    where hostname is the machine where the PL/SQL debugger (eg Visual Studio) is located, and portnum is a TCP/IP port it is listening on. When Oracle database receives this information, it immediately attempts to connect to the debugger on the port number specified. If there is no listener running on the port, this connection will fail and an error will be returned to the client.

    When you debug directly from Oracle Explorer in Visual Studio (manually typing in the parameter values for a SP and so on) ODT takes care of passing this host and port information for you. ODT also silently starts listening on the port. You aren't even aware that any of this this is happening. This is documented in the online help as "Direct Database Debugging".

    Similarly, when you call PL/SQL from .NET code, all you need to do is turn on "Oracle Application Debugging" (a checkbox in the "Tools" menu). The Oracle Application Debugging checkbox sets the environment variable in the Visual Studio process space and starts up the debugger listener, all without the user having to know or care about these details. You just check it, and away you go, debugging from .NET code into PL/SQL and back out again. This is documented in the online help as "Oracle Application Debugging".

    When you need to debug PL/SQL from ASP.NET, if you are using the "ASP.NET Development Web Server" which is the default IIS webserver testbed for Visual Studio 2005, things are still pretty simple. You can still use the "Oracle Application Debugging" checkbox, although with a couple very important caveats (see below).

    If you have an independent IIS webserver instead, things get just a little bit more complicated. In this case, the IIS Web Server process is technically external to the Visual Studio process. This is no problem since ODT lets you call the SP's you want to debug from ANY external process located on ANY machine, as long as that ORA_DEBUG_JDWP environment variable is set. It just means that you need to set this environment variable yourself and start the listener yourself, rather than relying on ODT to do it for you automatically. This is documented in the online help as "External Application Debugging".

    Setup Instructions - Using ASP.NET Development Web Server

    Here are the setup Steps for when you are using the ASP.NET Development server (a built in IIS web server for Visual Studio 2005). For most people, this will probably be the way to go:

    1) Perform the generic setup steps 1 through 9 from my earlier blog entry and test via Oracle Explorer ("Step Into") that at least Direct Debugging is working. You should skip step #7, which does not apply to ASP.NET projects. As per these steps, the "Oracle Application Debugging" checkbox should be checked, the Options page should be configured and breakpoints should be set.

    2) If the ASP Development Server is running (you will see an icon in your toolbar) you need to stop it before you begin debugging to force it be respawned so that it can pick up the Visual Studio environment variables. It's important to note that you need to stop the ASP Development Server every time you check or uncheck the "Oracle Application Debugging" option. You don't need to stop it every single time you run your app though. However, it's important to emphasize that you must stop the ASP Development Server when you are all done with PL/SQL debugging and have unchecked the "Oracle Application Debugging" - if you don't, your code will get connect errors.



    3) Begin debugging!

    Setup Instructions - Modifying the ASP.NET code

    Setup Steps for situations where you are not using the ASP.NET Development Server and it is ok to add some code and rebuild your ASP.NET app:

    1) Perform the generic setup steps 1 through 6 from my earlier blog entry and test via Oracle Explorer ("Step Into") that at least Direct Debugging is working.

    2) If "Oracle Application Debugging" is checked off under the Tools menu, be sure to uncheck it.

    3) Add code to your ASP.NET app to set the environment variable at the process level. You need to do this at a point in the code before a connection is opened. In C# this looks something like:

    Environment.SetEnvironmentVariable("ORA_DEBUG_JDWP", "host=mymachine;port=8888", EnvironmentVariableTarget.Process);

    4) It's a good idea to add code after the Oracle connection is closed that removes this environment variable. Since here we are setting this environment variable at a process level, it should not interfere with any other Oracle client apps running on your system. However it is important to note that if you do set this environment variable at something other than a process level (eg system level), you must be sure to unset it. All other Oracle apps on your system that see this environment variable will attempt to begin debugging everytime they connect and will get errors.

    Environment.SetEnvironmentVariable("ORA_DEBUG_JDWP", "", EnvironmentVariableTarget.Process);

    5) Set a breakpoint at some point BEFORE the first Oracle connection is made.

    6) Start debugging your ASP.NET application and run to this breakpoint.

    7) When the breakpoint hits, choose "Start Oracle External Application Debugger" from the "Tools" menu of Oracle Explorer. Provide it the same port number you gave in the environment variable above (in my case it was "8888"). Obviously your firewall cannot be blocking this port.



    8) Set a breakpoint in the PL/SQL (double click on the procedure or function in Oracle Explorer to bring up the editor).

    9) Set a breakpoint in your ASP.NET code AFTER the call to the stored procedure or function in ASP.NET to halt once control returns to ASP.NET

    10) Begin debugging!

    Setup Instructions - No Modification of ASP.NET code

    In some cases, you might not wish to modify and rebuild the ASP.NET. So you can't set the ORA_DEBUG_JDWP environment variable in code like we did above. In those cases, you can set a systemwide environment variable and bounce IIS, but this is a bit more tedious:

    In the steps above, replace steps 3 and 4 with the following:

    3) Set ORA_DEBUG_JDWP as a system environment variable. Go to Control Panel, System and choose the "Advanced" tab. Click on the "Environment Variables" button. Set the value in the section labeled "System Variables". Make sure when you are done with your debugging session to unset this system wide environment variable because as mentioned earlier, it will interfere with other Oracle client applications on your system!




    4) Stop and start the IIS Service from the Services Console (Control Panel->Administrative Tools) so that it picks up this environment variable.



    ....Then proceed with the rest of the steps in the list!

    If you have additional questions about PL/SQL debugging, feel free to post to the Oracle Dev Tools forum!

    Happy coding!

    Wednesday, September 13, 2006

     

    PL/SQL Debugging OraMag Article

    Check out Mark Williams' latest article in Oracle Magazine which takes you step by step through PL/SQL Debugging in Visual Studio. It also includes some sample code which you can use to try out PL/SQL debugging yourself!

    This sample code shows one of the most compelling uses of this debugger -- stepping seamlessly from .NET code into PL/SQL stored procedures or functions and back out to .NET code while examining real live data as it is being passed in and out. He uses an array parameter type in the stored procedure to show how powerful visual debugging can be -- no more DBMS_OUTPUT's of every element of a 1000 element array... you can just examine the array in the Visual Studio watch window!


    Wednesday, August 23, 2006

     

    OpenWorld "Schedule Builder" - Get First Dibs On Your Favorite Sessions

    Shay Shmeltzer's recent blog post reminds me to alert you that things are first come first serve at OpenWorld this year! Use the new Schedule Builder tool to get first dibs on your favorite .NET Oracle Develop sessions!

    Anyway, Shay said it so well, and has such a great first name, that I will just plagiarize from him shaymelessly:

    "But the conference is two months out, why should I do it now?" - you might be asking.

    Well the reason is that this is the only way you can guarantee you get to see the sessions you want to see. This year people who register for sessions ahead of time will get into the room before people who just show up. Considering the fact that this is going to be the biggest OOW ever in terms of number of attendees - you want to secure your place. Also, I know how it goes when you don't schedule, you start the conference spending the first hour of each day trying to figure out which session to go to - and by the time you end your daily planning you already missed the morning session. Scheduling your sessions now will also help us better plan rooms allocation for popular sessions.

    So do us all a favor and start scheduling now.

    Thank you, Shay!

    Thursday, August 03, 2006

     

    Sign up now for "Oracle Develop" at OpenWorld

    This October at Oracle OpenWorld we are adding an "event within an event" specifically aimed at developers. It's called "Oracle Develop" and we have an entire 2 day track focused specifically on Oracle and .NET developers. We have entry level topics for those of you new to .NET as well many sessions covering advanced topics and best practices.

    Here are some of the sessions you can attend:

    Getting Started with Oracle and .NET
    Deploying .NET Stored Procedures with Oracle Database
    Leveraging Oracle Grid Computing with .NET
    ADO.NET 2.0 and Change Notification with Oracle Data Provider for .NET
    Leveraging Oracle XML DB from .NET
    ODP.NET Best Practices: Deployment and Performance Tips and Tricks
    Developing Integrated Applications with Oracle Fusion Middleware and Microsoft .NET
    PL/SQL Programming for .NET Developers: Tips, Tricks, and Tools
    Oracle Developer Tools for Visual Studio .NET with Integrated PL/SQL Debugging

    There's also a hands on lab:
    Hands-on Lab: Building .NET Applications with Oracle

    For more details on each of the sessions listed above, go here.
    For general information and an overview of Oracle Develop - go here.

    Oracle Develop will be held on October 23-25 (during the OpenWorld week) at the San Francisco Hilton and at the Moscone Center. It's available at no extra charge for those of you with a full conference pass to OpenWorld or you may sign up specifically for Oracle Develop. See you there!

    Thursday, July 20, 2006

     

    PL/SQL Debugger in Visual Studio Configuration

    We just released ODAC 10.2.0.2.20, and one of the new features included in the production version of the Oracle Developer Tools for Visual Studio .NET is a fully integrated PL/SQL Debugger that works with both Visual Studio .NET 2003 as well as Visual Studio 2005. It also supports most Oracle datatypes in the debugger including PL/SQL arrays, PL/SQL records, UDTs and so on.

    Configuring it for the first time requires a few steps that are well documented in our online help (installs with ODT), but I figured I should post them here to aid those of you who want to take the PL/SQL debugger on a test drive as quickly as possible.

    Step 1: Make sure the database you are going to use is version 9.2 or later.

    Step 2: Using the ODT Query window or SQL*Plus, connect with SYSDBA priveleges and "grant debug any procedure to username". As an alternate to the debug any procedure privilege, you may grant both debug and execute permissions on the particular PL/SQL program being debugged.

    Step 3: If you are using Oracle 10, you also need to do a "grant debug connect session to username".

    Step 4: Compile the PL/SQL program units with debug information. To do this, go to the Oracle Explorer and find the node that represents the package, procedure or function that you want to debug. Right click it, and from the menu select Compile Debug. The icon next to the PL/SQL procedure or function will change to reflect the fact that it has been compiled with debug information.



    Step 5: Set the PL/SQL Debugger options: Select Tools -> Options from the Visual Studio menu. Select Oracle Developer Tools in the Options list, and then select the check box next to the connection that you are using in the Available Database Connections list. This tells the PL/SQL debugger to look for the PL/SQL code using this connection. In the same location, you will see a TCP/IP port range. During PL/SQL debugging, the Oracle Database will connect to Visual Studio via TCP/IP on a random port within this range. Make sure this range represents open ports on the machine with Visual Studio on it, and that the ports are not blocked by a firewall.



    Step 6: At this point you can immediately begin debugging by right clicking on the procedure and function name in Oracle Explorer and choosing "Step into" or "Run Debug" (if a break point is set)



    Step 7: If you want to debug .NET code that calls your PL/SQL procedure and look at the live data being passed back and forth, you have three more steps - Assuming your .NET application project is loaded, select Project -> Properties from the Visual Studio main menu, click the Debug tab, and uncheck "Enable the Visual Studio hosting process" in the Enable Debuggers list. If you don't do this, you will have to run the debugger one time and stop it before it will work correctly.



    Step 8: Turn on the Application level debugger - select Tools -> Oracle Application Debugging from the Visual Studio menu, and ensure there is a check mark next to Oracle Application Debugging



    Step 9: Set a breakpoint in the PL/SQL program, and you may also want to do so in your .NET application code at some line of code AFTER the call to the PL/SQL program. That will stop execution after you return from debugging the PL/SQL. Next, build and begin debugging your .NET application, and the PL/SQL breakpoint will fire. Then you can look at the live data being passed back and forth between your .NET app and the PL/SQL procedure.

    More on the PL/SQL debugger in the days ahead...... happy coding!

    This page is powered by Blogger. Isn't yours?

    © Copyright 2007 Christian Shay