[Zope-DB] Change connection objects outside of Zope

Mark Langkau mark.langkau@pbmplus.com
Thu, 16 Aug 2001 08:52:09 -0500


Hi,

Thanks for the new list!

Here's a general question about changing connect strings for any
database adapter. We are using DCOracle2 Beta4 (about to upgrade to Beta
5).

How would I go about programmatically changing the connect string in a
database connection object? In our production environment, we change our
database passwords on a regular basis. It will become a pain to change
all of the hard coded user/password strings in the connection objects.
(There may not be a large number to change - but *remembering* to change
them, and to find all of them will become a maintenance issue ;-)

It would be great to have an external script that would look for the
connection object, and if it finds a match for a username (or other
parameters to ensure we're looking at the right thing), then change the
password.  We could have a script that changes the actual database
account info, then call the script that would make the same change in
Zope.

That's the high level concept. Is anyone doing something like this? If
this sounds like a reasonable idea, I could make a recipe request at
ZopeLabs.

Thanks,
Mark