Orton, Yves wrote:
DBD::Ingres does something similar. DBD::Oracle appears to be closer to
Sybase/MySQl:
"dbi:Oracle:host=myhost.com;sid=ORCL"

Normally you don't bother with connection parameters with Oracle at all:

  DBI->connect("dbi:Oracle:", "database", "password");

Instead, you configure which logical Oracle installation that you want
with an environment variable.  The information about where that database
actually lives is in a config file in the Oracle client installation.

So, if you actually override the environment variable by specifying the
SID in the program, you run the risk of confusing the poor SysAdmins who
look after it, as every other program honours this convention.

> Clearly any DBD driver that can connect to providers on a different
> host will have to in some way allow the user to specify which host
> that is.

Not necessarily.  There might be an ORB or some other name service
locator that finds those details out at run time given something that
isn't a host name.

I think that this information should be removed from most programs
altogether.  They should just have to specify a logical data source
(possibly including a schema version), then a module with a config file
maps that to a set of connection parameters.

ie, if we're going to go ahead and try to make some sense of how you
specify the parameters to the DBI connect call, why don't we go the
whole way and think about where that connection information is coming
from?
--
Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13
(include my PGP key ID in personal replies to avoid spam filtering)

Reply via email to