Skip to content
mmakowski edited this page Sep 13, 2010 · 8 revisions
Summary: Inquisitor is a Windows GUI for querying Oracle databases, designed to provide as little functionality as practical.

Background

In one of my past jobs I had to work with Oracle quite a lot — executing queries, writing a little bit of PL/SQL etc. — standard database development stuff. The tool of choice in my team was Toad, which I happened to dislike for its unintuitive UI, sluggishness and lack of stability. I played a bit with Oracle SQL Developer, which had its own problems — again, stability and speed were not one of its strenghts — and in the end decided to put something simple together myself.

What Works

I ended up taking excellent free Scintilla.Net editor component for text editing and Oracle Data Provider for .Net to connect to the database. The glue code did not take much effort and the result at the moment is a simple SQL editor that lets you write your query (or a block of PL/SQL), connect to a database and execute the query. It would then progressively load the results to display grid and let you export them to a CSV file. And that’s it.

What Does Not Work

The functionality was added as it proved necessary for my work. Some operations are not obvious since I only implemented the way of executing them that I most commonly used. For example, to execute a query it has to be a single block of text, without any empty lines; you then place a caret somewhere in the block or at the beginning or end (a natural position if you’ve just typed it in or modified it) and hit Ctrl+Enter. I got used to this way of running queries in Toad and didn’t bother implementing anything else.

Many other things you’d normally take for granted, like file open and save, are missing. I just didn’t need them.

The Trouble with ODP.Net

One particular shortcoming which did bother me and which I didn’t manage to fix was Inquisitor’s lack of ability to return nested cursors in query results. I found out that basically ODP.Net doesn’t support it (see this thread on OTN Discussion Forums), so decided to fix it by rewriting database access layer using low-level OCI calls. Given the size of OCI API, porting it to .NET in its entirety is a monumental effort. My goal was less ambitious: just provide the minimal set of API calls that will allow to execute a query and display its results. This was complicated still — just executing a query requires 14 OCI calls (see OciNetTest/Program.cs) and I didn’t manage to finish this work. The Inquisitor.Db module still uses ODP.Net, the beginnings of OciNet can be found in the project under this name in Inquisitor codebase.

As a side note, while creating the interface to OCI it occurred to me that most of the C# API wrappers can be generated automatically from OCI headers.

How it Died

I left the job, stopped working with Oracle and lost the interest in maintaining and developing Inquisitor. If you’d like to use it as it is or improve it, you’re more then welcome. I might even start working on it again if it turns out someone else is interested in this software.

What is Needed to Resurect it

You will need: