[Catalyst] reconnecting the DB model using a different DB account

Karl Forner karl.forner at gmail.com
Tue Mar 10 17:55:50 GMT 2009


Hi all,

I'm trying to use DB authentication and afterwards using the DB user account
for subsequent DB queries.
To do so, in the Root::auto method, if the DB model is already connected
with another DB account, I disconnect it and try to reconnect it with
the new user and password.

I disconnect as follows :
$c->model('DB')->storage->disconnect

and I reconnect like this:
$c->model('DB')->storage->connect_info($current_connect_info);
$c->model('DB')->storage->ensure_connected;

The problem is that I get error messages
[error] DBIx::Class::Storage::DBI::ensure_connected(): DBI Connection
failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var  or PATH
(Windows) and or NLS settings, permissions, etc.

I have tried using directly the DBI dbh but with the same results.

Thanks for helping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090310/d0669=
9b4/attachment.htm


More information about the Catalyst mailing list