Apache::session and Apache::DBI::Oracle headaches part 2
Quite right...Commit does need to be enabled. Here's the trick though... (code from the script making the connection through Apache::Session::Oracle tie %hash, 'Apache::Session::Oracle', $id, { DataSource => 'dbi:Oracle:ensdev', UserName => '', Password => '', Commit => 1 }; ) Commit is enabled in the script that is performing the connect. The problem that seems to be happening is that Apache::DBI::Oracle has db connections hanging around with commit set to 'off' and the commit from the script using Apache::Session isn't overriding the Autocommit = 'off' connection made by Apache::DBI::Oracle. To complicate the matter, I shouldn't have AutoCommit set for all database interactions it would fill the database with yuck and then our DBA would have to beat me. I do recall reading about a special case with Oracle where the Session::store( ) method was called to commit the data, however, I can not find this special case in anywhere in the documentation. I think I saw it in a doc for an older rev of Apache::DBI. Sheesh! Thanks, Chad
Re: Apache::session and Apache::DBI::Oracle headaches
On Tue, 11 Jul 2000, Chad Billigmeier wrote: > Having a bit of trouble getting apache::session to run with apache::DBI. Is > this due to the fact that Oracle wants AutoCommit on and Apache::DBI has it > off or is there some other magic that I am missing out on? Is anyone using > Apache::Session with Apache::DBI??? > > The error_log reports finding an existing DBI connection but no data is > written to the tables. Autocommit is off...I remember reading something > about Session::store() but can't find it anywhere. Can anyone help. I quote from the Apache::Session::Oracle perldoc: The special Apache::Session argument for this module is Commit. You MUST provide the Commit argument, which instructs this module to either commit the transaction when it is finished, or to simply do nothing. This feature is provided so that this module will not have adverse interactions with your local transaction policy, nor your local database handle caching policy. The argument is mandatory in order to make you think about this problem. If that isn't enough information, let us know. Your problem report is incomplete and confusing, so we will need a more clear picture before we can provide more help. Best Regards, Jeffrey Baker
Apache::session and Apache::DBI::Oracle headaches
Having a bit of trouble getting apache::session to run with apache::DBI. Is this due to the fact that Oracle wants AutoCommit on and Apache::DBI has it off or is there some other magic that I am missing out on? Is anyone using Apache::Session with Apache::DBI??? The error_log reports finding an existing DBI connection but no data is written to the tables. Autocommit is off...I remember reading something about Session::store() but can't find it anywhere. Can anyone help. On a Solaris Apache 1.3.12 Perl 5.6.0 mod_perl 1.24 most recent Apache::Session most recent DBI.pm Oracle 8i Chad Alan Billigmeier Software Engineer 160 Second Street Cambridge, MA 02142 -