Christian Shay

Subscribe to Christian Shay feed
Christian Shayhttp://www.blogger.com/profile/01109392506865828110noreply@blogger.comBlogger35125
Updated: 4 hours 35 min ago

Getting Ready for Windows Vista

Mon, 2007-02-05 05:24
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!

Which source control system are you using?

Tue, 2006-11-14 16:38
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!

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

Thu, 2006-11-02 23:47
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!

Join us at Microsoft TechEd Europe and UKOUG

Tue, 2006-10-31 17:00
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!!!

Debugging PL/SQL from ASP.NET and Visual Studio

Tue, 2006-10-10 10:15

[Update March 2015: This very popular blog post is quite a bit out of date after 9 years! It is no longer particularly feasible to use only one instance of Visual Studio for PL/SQL and ASP.NET debugging. We now recommend you use two instances of VS along with "External Application Debugging".

To get the latest details on how to use PL/SQL debugging with Visual Studio have a look at the Oracle Developer Tools for Visual Studio (ODT) online help. From Visual Studio, find the ODT help, find the "Oracle PL/SQL Debugger" section, then "PL/SQL Debugging Setup", then go through the"Debugging Setup Checklist". - CS]


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!

PL/SQL Debugging OraMag Article

Wed, 2006-09-13 19:56
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!

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

Wed, 2006-08-23 20:17
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!

Pages