With Microsoft SQL Server, you could use Windows authentication instead
of SQL Server authentication. All you have to do is create a Windows
user in SQL Server, then eliminate the username and password when connecting
via DBI, like so:
my $dbh = DBI->connect("dbi:ODBC:DRIVER={SQL Server};".
"SERVER=$instance;DATABASE=$db",
{RaiseError => 1, PrintError => 1})
or die "\n\nCannot connect.\n\n$DBI::errstr\n";
glen accardo
BMC Software, Inc.
-----Original Message-----
From: Ian Harisay [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 12:57 PM
To: [EMAIL PROTECTED]
Subject: Question about logging in without username and password
Hi All,
I am moving one of my programs to be run on a different box. The rules are
a
bit different on the other box. One of those things is that the username
and
password can not be hardcoded into the program. I don't have all the
information yet, but does anyone know if the way to do this is through
environment variables? if it is another please clue me in. Just trying to
get
a little background.
I looked in 'Programming the Perl DBI' didn't find anything that covered
this.
I could just be blind though.
Thanks,
-Ian