Installing Oracle Drivers: A Heuristic Approach

Oracle, n. Database named after people who spent all their time sucking fumes and spouting nonsense.

Installation Phase. Download Oracle Express, Oracle ODBC, Oracle JDBC, and anything else that might have a functioning installer. You must be initiated into the brotherhood of those who receive spam from the Oracle. It’s kind of like hearing the voices of the gods in your head, but it’s comes by email.

Sacrifice. Sacrifice a lackey to the Oracle. The Oracle is an angry god and must be appeased. The version number indicates how many the Oracle demands.

File Search Phase. Find the listener.ora, tnsnames.ora, sqlnet.ora. There may be many, you will never know which one an active driver may be using.

Ritual. Reboot the server, your workstation, stop and start all services, kill all tasks and restart them as well. Sacrifice an intern as well. The Oracle demands blood.

Network Test Phase. Tnsping proves that an application can move electricity from here to there and get electricity back. Given the dim hope of actually getting data back, researchers are working on ways to harness the returning electricity to power office lights and pencil sharpeners.

Test Phase. Sqlplus may or may not end up on your machine. Sqlplus is the preferred way to deal with the Oracle as the tippity tappity of keys strokes on a command line are pleasing to the ears of the Oracle. If sqlplus is not on your machine after installing drivers, return the Oracle and keep downloading random crap until sqlplus appears on your machine.

Trace Phase. When trouble shooting a linked oracle server on SQL2000, to get better error messages, you need to run “DBCC Traceon(7300)”

Alternate technologies. It is possible that the oracle driver works, or has better error messages when you use other technologies. Write a series of applications using ODBC, JDBC, OLE-DB that define a connection string, attempt to connect, and either display the error message or a success message. If possible, use the “tnsnames.ora”-free connection string. If you get a “tnsnames.ora”-free connection string to work, you can use that to update the tnsnames.ora file. This is was the technique I used to finally get a successful connection.

Shock. I can’t believe Oracle drivers are this crappy.

Denial. I must be doing something wrong. This isn’t happening to me.

Bargaining. I give you a chocolate bar if you can fix this tnsnames file for me?

Guilt. I’m a talentless hack. I’ll never connect to the Oracle. This is the end of my career.

Anger. Damn it, I’m going to go over to Larry Ellisons house and make him configure this damn driver!

Depression. Screw it. I the project is going to fail as soon as the dev team finds out the drivers are impossible to install. Sigh.

Acceptance. Oracle sucks. Data in oracle is inaccessible.

Hope. And least there are a lot of other relational databases in the world that do have drivers that just work. Even companies as big as Oracle sometimes go out of business, never to be heard from again. Ah, it feels good to dream.

API’s I don’t Like

WMI. Relies on barely discoverable magic words (Namespace paths). Uses SQL as metaphor, but doesn’t actually have a proper database or relational structure behind it.

ADSI. Incomprehensible. Can’t easily play around with it as local authentication stores don’t act like active directory. And mere developers don’t usually have rights to Active Directory. Hence, no path to gaining competence.

Win32. Not friendly to languages other than C++. Incomprehensible.

Crypto API. Incomprehensible.

Javascript. Generally undiscoverable, but getting better with some IDE’s.

API’s that are better

COM, when early bound. Examples, ADO classic. Somewhat discoverable. When late bound relies on barely discoverable magic words (construction strings, method calls). Not friendly to languages that weren’t built specifically to be COM friendly.

WSDL Web Services. Not friendly unless you are using tools that ‘do it all for you’

API’s I like

REST. Plays very well with all programming languages that can make a GET request and receive an HTTP response.

.NET Framework. Highly discoverable, documentation strategy is build into the framework.

Patterns

  • Discoverable metadata. APIs that could support intellisense if the IDE supported it are good. APIs that make it too hard for IDE’s to support intellisense are bad.
  • Independent. APIs that have a fierce registration burden—I don’t like.
  • Built in documentation. APIs should have javadoc type documentation features
  • Aspect Orient Programming Features. API’s that automatically support Trace/Debug/Logging are good.

DTS: Unfriendly BIDS message

And just what exactly am I supposed to do with this?

“Unable to cast COM object of type ‘Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageNeutralClass’ to interface type ‘Microsoft.SqlServer.Dts.Runtime.IObjectWithSite’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{FC4801A3-2BA9-11CF-A229-00AA003D7352}’ failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)). ”

This may have something to do with the DTS.dll COM component not being registered.  I haven’t followed up on that theory.

Getting Subversion to Work: Tips

Apache Server. Don’t change versions. Changing versions is a super-duper-ultra-advanced user scenario. Mere super geniuses shouldn’t attempt. Use the version that comes with the Collabnet subversion installer. (The blank URL warning the installer gives you means it doesn’t want http:// in the field.) In fact, this is probably a good idea for all LAMP stack applications—it’s better to have a dozen LAMPs that work than a dozen broken apps using the same LAMP.

The Passwords.

htpasswd.exe -cs passwords.txt matthew
pause

The Location. The location should look something like this. Ideally you want this over https, but getting apache to run https is a pain.

<Location /svn>
DAV svn
SVNParentPath c:\svn

AuthType Basic
AuthName “Vienna Subversion Repository”
AuthUserFile “C:/Program Files/CollabNet Subversion Server/httpd/bin/passwords.txt”

Require valid-user
</Location>

SSL. SSL is fairly hard. Your first goal will be to get SSL to work with any certificate at all. The next goal will be to get the SSL certificate to match the URL, expiration date and so on. Even if you get rid of the expiration and URL errors, you will be dogged by certificate authority warnings until you pay money for an SSL cert, which is not worth it.

Checking Out/Checking In Code. Use a combination of Ankh and Tortoise.

Visual Studio 2005: Installation Woes

So I have a clean Windows XP VMWare virtual machine.

I try to install from Remote Desktop. VS2005 actively refuses.

VS2005 from the c: drive. I copy all the files from the CD’s to the virtual machine’s hard drive. Visual Studio fails to ask for the location of the next disk, and instead reports that it wants the files for disk 2 and 3 to be merged in with the files from disk 1. That is, it wants me to re-arrange the files of the three disks until they are as if they were on one disk. Somehow I manage to shuffle files around, the install finally hangs at 0 CPU for a very long time on the SQL Express install. I didn’t really want SQL Express, I use SQL2000 Developer Edition, so I kill the install. It looks like most of the bits made it on the disk.

MSDN. Same problem. The MSDN installer can’t deal with being installed from c:\ and doesn’t prompt for the location of disk 2, 3, etc. The MDSN installer eventually blows up. I think screw it, google works better anyhow. Because of the broken search on MSDN since VS2005, I’ve been trained to go to google first whenever I have a question.

Visual Studio 2005 Service Pack 1. VS2005 SP1 is a massive re-install. I use the VMWare remote client to pass through. The install hung after a night.

Advice. Create and mount ISO files when installing VS2005 to a virtual machine. The VS2008 Beta 2 install went through effortlessly. Consider switching to VS2008 beta before the official Feb 2008 release date.

 

Authentication Mystery: When Membership.GetUser is null

When Membership.GetUser is null or nothing, but login succeeds (and fails on a bad password), check the path as such…

<authentication mode=”Forms” >
    <forms …
               path=”/” 
               …  >           
</authentication>

Mine was set to path =”blahblah/blah”.  I changed it to “/” and things worked again.

Has something to do with browsers rejecting the cookie because it didn’t look like it was coming from the right server.