Copying RoR Session Data Into Oracle v$session


I just wrote a short paper and put it on my site:

Copying Data From A Ruby On Rails Session Into An Oracle Session

The intended audience is people who know a little about Rails and/or a little about Oracle.

It might be of interest to webmasters/DBAs who want to "link" SQL they see in V$SQL with controller methods in their RoR sites.

I'm wrestling with this issue at a site which uses Java technology (JBoss).

We see a lot of resource intensive SQL hitting the database but we don't always know where it is coming from.

Rails makes some things so easy.


Dan Bikle wrote:

Copying Data From A Ruby On Rails Session Into An Oracle Session

But aren't the Oracle sessions on an application basis (or, at least, application server basis) and the RoR session on a user basis? There is not a new Oracle session for each user connected to an application, so I'm not clear on how useful it would be to have the Oracle session constantly being updated by every user request...

Excellent article Dan. I'll be testing the use of v$session in my Rails applications asap. It's a type of instrumentation that links the Rails logs into the Oracle diagnostics, which is great. Hopefully gone will be the days of peering at Oracle sessions trying to figure out which one of them is attached to a particular Rails session.