## Problem with Transactions on Windows 64-bit Oracle Client

After upgrading to a 64-bit machine at the office, my Visual Studio 2010 unit tests that were making heavy use of transactions (i.e., hundreds of uncommitted database table insertions within a using (new TransactionScope()) statement) failed with the following error message:

ORA-00603: ORACLE server session terminated by fatal error ORA-00600: internal error code, arguments: [ktcirs:hds], [0×00F7D8078], [0×006F10BF0], [0×01B8C8078], [], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [ktcirs:hds], [0×00F7D8078], [0×006F10BF0], [0×01B8C8078], [], [], [], [], [], [], [], [] Process ID: 4084 Session ID: 125 Serial number: 369

#### The solution

1. Install 64-bit Oracle Client 11.1.0.6.0 (win64_11gR1_client.zip) but do not install Oracle Services for Microsoft Transaction Server.
2. Install only OraMTS using 64-bit Oracle Data Access Component 11.2.0.2.1 (ODAC112021Xcopy_x64.zip).

#### What’s the problem, BTW?

“Windows Vista and Windows Server 2008 introduce new MSDTC changes that do not interoperate with older versions of Oracle Services for MTS. Oracle Services for MTS 10.2.0.4 and higher, with the exception of 11.1.0.6, support these new changes on Windows Vista Service Pack 1 and Windows Server 2008 or higher.” Source: http://www.oracle.com/technetwork/database/windows/index-089915.html

3 August 2011 | Uncategorized | No Comments

## Robocopy in lieu of rsync

Perhaps you’re a web developer familiar with Linux and SVN. Then you’ll definitely know how to copy files from your SVN working directory to a test server whilst excluding all .svn directories:

rsync -IrW --stats --exclude=.svn /path/to/project/dir/ //testsrv/whatever

If for some reason your development environment is Windows you might be tempted to use rsync on Cygwin. That’s works fine (albeit with a very noticeable performance lag), but there is actually a native Windows alternative to rsync:

robocopy \path\to\project\dir \\testsrv\whatever /MIR /XD .svn

Robocopy has long been available on NT 4.0 via the Windows Resource Kit, and is included in Vista, Windows 7, and Windows Server 2008.

1 February 2011 | | 1 Comment

## Memories of the past

The past doesn’t exist, except in our minds. There is not one past, but many pasts, each belonging to a different person.

If not for memory, there would be no such thing as the past. It is literally all in the mind.

Easy enough to comprehend, but extremely difficult to internalize.

9 January 2011 | Uncategorized | 6 Comments

## A fundamentally flawed argument

I believe that everyone has at least one fundamental flaw. Those who think they aren’t fundamentally flawed turn out to have three fundamental flaws: first, their fundamental flaw; second, their ignorance of their fundamental flaw; and third, their belief that they are free of fundamental flaws.

The least fundamentally flawed are those armed with full knowledge of exactly how much and in what way they are fundamentally flawed. Inhabiting unhappy middle ground would be those who are aware that they’re fundamentally flawed, but now how so.

If it is indeed possible not to be fundamentally flawed, then that would be the biggest fundamental flaw of all.

8 January 2011 | Uncategorized | No Comments

## Implementing the right-click context menu in Silverlight 4

• System.Windows.Controls
• System.Windows.Controls.Input.Toolkit
3. In your UserControl XAML, add the following to the LayoutRoot grid opening tag: MouseRightButtonDown="LayoutRoot_MouseRightButtonDown" MouseRightButtonUp="LayoutRoot_MouseRightButtonUp"
4. In the codebehind:
using System.Windows.Controls;

...

private void LayoutRoot_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
}

private void LayoutRoot_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
{

}

private void menuItem_Click(object sender, System.Windows.RoutedEventArgs e)
{

• If you don’t include a reference to System.Windows.Controls, you won’t be able to compile, with the error “‘System.Windows.Controls.MenuItem’ does not contain a definition for ‘Header’ and no extension method ‘Header’ accepting a first argument of type ‘System.Windows.Controls.MenuItem’ could be found (are you missing a using directive or an assembly reference?)”
• Ensure that System.Windows.Controls.Toolkit (if present) is version 4.0.5.0. If it’s version 2.0.5.0, you’ll get runtime error “Unknown parser error: Scanner 2148474880. [Line: 818 Position: 596]”