Monday, September 2, 2013

ORA-04043: object DR$SESSION_STATE_T does not exist

Took me a while to sort this one out, posting my notes in case Google thinks it worthy and it helps someone.

I got this error trying to enable Oracle Text, which provides full text search capabilities. Oracle provides a SQL script (in $ORACLE_HOME/ctx/admin) to enable this capability.

The issue was simple, once I figured it out ... I was running the script as the SYSTEM user and not the SYS user. Doh!

Here's the script that worked:

$ cat configure_ctx.sql
spool configure_ctx.log
@?/ctx/admin/catctx.sql oracle sysaux tempts1 NOLOCK
spool off
$ sqlplus sys/oracle as sysdba @configure_ctx
[snip!]
PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Session altered.
Note: the ? in the @? above is a SQLPlus shortcut for ORACLE_HOME

Useful Links on Oracle Text

The 11.2g VirtualBox appliance that Oracle provides does not come with Oracle Text (full-text search) configured. The ArsDigita system uses this, so I needed to set it up.

Cluestick on how to login as SYS (hint: as sysdba)
http://toddlerdba.blogspot.com/2011/04/install-oracle-text-oracle-database.html
How to drop Oracle Text before re-installing
http://blog.it-iresource.be/?p=260
SQL you can use to see if Text is intalled
https://forums.oracle.com/thread/2169244

Script to Drop Oracle Text

While debugging this problem, I had to drop before re-installing.

$ cat drop_ctx.sql
spool drop_ctx.log
@?/ctx/admin/catnoctx.sql
drop procedure sys.validate_context;
exit;
$ sqlplus sys/oracle as sysdba @drop_ctx
[snip!]
Session altered.

dropping user ctxsys...

Role dropped.


User dropped.


Procedure dropped.

Sunday, September 1, 2013

AOL Server 3.3 up and running with Tcl 8.4

Both AOL Server and it's Oracle driver new build with an ansible playbook.

Mainly a some patches to the AOL build. Big ones:

  • Tcl 8.3 had some threading issues they had to work around (which are fixed in 8.4).
  • 8.4 added const-correctness. Fortunately, they also added a define that turned off the checking. (Eventually, the AOL Server code should satisfy the const correctness.)

Most of the work ended up in the a patch file.

I'm glad I stuck with 3.3, I found this porting guide for AOL Server 3 to 4. So it's possible ArsDigita Community System won't work with 4.0.

Given how tricky it was to port, it would have been much simpler to use Tcl 8.3. But now I know the AOL build system pretty well. Hopefully, the ArsDigta code will run with 8.4.