Re: multiple database users

[prev] [thread] [next] [Date index for 2005/06/06]

From: Mark Addison
Subject: Re: multiple database users
Date: 11:20 on 06 Jun 2005
On Mon, 2005-06-06 at 12:29 +0200, Hartmaier Alexander wrote:
> And where can/should I override the default db_Main?
> I have no idea how to do that...

Do it in your cdbi base class (so all your db classes use it). See the
following for examples:

http://wiki.class-dbi.com/index.cgi?UsingMultipleDatabases
http://wiki.class-dbi.com/index.cgi?UsingWithModPerl

-mark

> -----Urspr=FCngliche Nachricht-----
> Von: William Ross [mailto:will@xxxxxxx.xxx]=20
> Gesendet: Freitag, 3. Juni 2005 10:43
> An: Hartmaier Alexander
> Cc: cdbi-talk@xxxxxx.xxxxx.xxx
> Betreff: Re: multiple database users
>=20
> On 2 Jun 2005, at 18:43, Hartmaier Alexander wrote:
>=20
> > Hi list!
> >
> > I just found out that one of my scripts is using the wrong db user =20
> > to access my database.
> >
> > I created different users with different access rights in oracle I =20
> > used before CDBI.
> >
> > The connection info is stored in the base class so a different user =20
> > means a different db connection regardless which parameter is =20
> > different.
> >
> > This topic was already on the list but for different databases but =20
> > I think it=FFs the same problem
> It is the same problem. If you want cdbi to use a different database =20
> handle under different circumstances, you need a sub db_Main() in =20
> your base class (or wherever) that selects the handle according to =20
> your criteria. That sub needs to return an appropriate =20
> DBIx::ContextualFetch object, btw, and should be as quick as possible =20
> as it's called very frequently.
>=20
>=20
> will
This email (and any attachments) is intended solely for the individual(s)=20
to whom addressed.=20
It may contain confidential and/or legally privileged information.=20
Any statement or opinions therein are not necessarily those of ITN unless s=
pecifically stated.=20
Any unauthorised use, disclosure or copying is prohibited.=20
If you have received this email in error, please notify the sender and dele=
te it from your system.=20
Security and reliability of the e-mail and attachments are not guaranteed.=20
You must take full responsibility for virus checking.

Please note that to ensure regulatory compliance and for the protection of =
our clients and business,=20
we may monitor and read e-mails sent to and from our server(s).


Independent Television News Limited,

Registered No. 548648 England,

VAT Reg. No: GB 756 2995 81,

200 Gray's Inn Road, London WC1X 8XZ,

Telephone: 020 7833 3000.

multiple database users
Hartmaier Alexander 17:43 on 02 Jun 2005

Re: multiple database users
Andreas Fromm 07:13 on 03 Jun 2005

Re: multiple database users
William Ross 08:42 on 03 Jun 2005

Re: multiple database users
Hartmaier Alexander 10:29 on 06 Jun 2005

Re: multiple database users
Mark Addison 11:20 on 06 Jun 2005

Re: multiple database users
William Ross 11:39 on 06 Jun 2005

Re: multiple database users
Tony Bowden 13:09 on 06 Jun 2005

Re: multiple database users
Mark Addison 13:34 on 06 Jun 2005

Re: multiple database users
Perrin Harkins 14:30 on 06 Jun 2005

Re: multiple database users
Hartmaier Alexander 11:31 on 06 Jun 2005

Re: multiple database users
Hartmaier Alexander 11:51 on 06 Jun 2005

Re: multiple database users
William Ross 13:46 on 06 Jun 2005

Re: multiple database users
Hartmaier Alexander 14:03 on 06 Jun 2005

Re: multiple database users
William Ross 15:30 on 06 Jun 2005

Re: multiple database users
Hartmaier Alexander 16:44 on 06 Jun 2005

Re: multiple database users
William Ross 18:26 on 06 Jun 2005

Re: multiple database users
Jay Strauss 02:53 on 07 Jun 2005

Re: multiple database users
Perrin Harkins 03:58 on 07 Jun 2005

Re: multiple database users
William Ross 10:23 on 07 Jun 2005

Re: multiple database users
Hartmaier Alexander 09:28 on 07 Jun 2005

Re: multiple database users
Perrin Harkins 12:49 on 07 Jun 2005

Re: multiple database users
Hartmaier Alexander 12:49 on 07 Jun 2005

Re: multiple database users
Perrin Harkins 12:54 on 07 Jun 2005

Re: multiple database users
Hartmaier Alexander 13:02 on 07 Jun 2005

Re: multiple database users
Mark Addison 13:47 on 07 Jun 2005

Generated at 16:35 on 28 Jul 2005 by mariachi v0.52