Monday, August 2, 2010

VoraX and Oracle Documentation Offline Search

Lately, I found myself using VoraX a lot. However, one feature that I miss is searching through the oracle documentation. For example, let's say I've just queried the v$session view and there's a column there called PDML_ENABLED. Okey, what does it mean that? I want to know more about this column. That's not such a big problem... it basically boils down to:
1. open your favorite browser;
2. go to the oracle official documentation and enter the text you want to search. This link should guide you directly to the search facility.
Okey, so is not such a big deal but it can be annoying especially when the Oracle site is slow... and from my experience this happens quite often. You may think that an offline search might help... just download the documentation package and search locally. NO! That's not an option. The search facility always goes through the internet... and if you are not connected to the internet then is sad...
But, don't be too disappointed... there's still a nice solution. You may use Google Desktop to perform offline searches. It works like a charm in connection with vorax... while in VoraX activate google desktop and search for your term. That's it... fast and convenient. However, you have to pay attention to some details about configuring Google Desktop. By default it will index almost everything on your computer: emails, word documents, web history etc. etc. etc. You'll end up having a huge index cache with a lot of information not related to Oracle at all. So, my first idea was to index just one folder, the one with the oracle documentation. Apparently, this doesn't work: all fixed drives are indexed by default. Okey, there's also a section which says: "Add file or folder to exclude". I thought that adding there all my fixed drives and then explicitly telling Google Desktop to index my documentation folder will work. Well, not the case... really! If your documentation is, let's say, within C:\oracle\docs and you exclude the C: drive nothing will be indexed at all. The last thing I tried and it worked was mapping my documentation directory to a logical drive. In windows you may use the following command:
subst x: "c:\oracle\docs"
Then tell google desktop to index your X: drive and exclude all the others. Ieei, that's nice... i have offline search-able oracle documentation which is very easy to access from any application, including VoraX.
There was still a problem. The Oracle documentation is huge and I don't want everything from there. For example, if you search for V$SESSION a lot of results will come from replication documentation which is not really what I am looking for. So, in the end I decided to manually index just the books I found to be the most relevant ones. From the last 11.2 Official documentation I've selected just several directories and I put them as shown below:
X:\
|
+-- official_11_2
    |
    +-- dcommon
    |
    +-- favourites
        |
        +-- e10577
        |
        +-- e10592
        |
        +-- e10820
        |
        +-- e10880

Basically, I've selected the following books:
1. Oracle® Database PL/SQL Packages and Types Reference
2. Oracle® Database SQL Language Reference
3. Oracle® Database Reference
4. Oracle® Database Error Messages
These are the books I use to search a lot when I'm in the middle of writing sql/plsql code. Now, I have just a small set of the whole documentation which is faster to index and easier to browse.
I didn't have the time to try this configuration on UNIX systems but I'm quite confident that it should work.

Update 1: The above directory numbers for each book may be different in your documentation package.
Update 2: Starting with version 2.3 VoraX provides built-in Oracle HTML documentation search. Details may be found here.

2 comments:

oracle r12 documentation said...

I agree- the oracle documentation feature is a a pretty useful one, and I haven't found anything quite as good to replace it. The solution you are offering here seems to be good (at least on paper), I'll give it a try.

Alexandru Tică said...

Starting with version 2.3 VoraX provides build-in oracle offline documentation search. For a quick demo have a look at: http://vorax-ide.blogspot.com/2010/09/ready-for-vorax-23.html