-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Summary: Inquisitor is a Windows GUI for querying Oracle databases, designed to provide as little functionality as practical. |
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.
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.
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.
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.
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.
You will need:
- Microsoft Visual C# 2008 Express Edition (later versions should work too), available free of charge
- Oracle 10g Express Edition (might work with 11g as well) which can be downloaded for free