hi all,
I am using this to login to my MSSQL2K server.
my $DSN = "driver={SQL Server};Server=$host;database=$table;UID=$uname
+;PWD=$pwd;";
my $dbh=DBI->connect("dbi:ODBC:$DSN") || die "Error: $DBI::errstr";
This works fine, until i try to connect to a remote SQL server. The remote connection error string says "Microsoft\ODBC SQL Server Driver\SQL Server\Login failed for user '<MyDomain>\<MyUserName>'. (SQL-28000). Which indicates to me, that the $DSN string doesn't really make much difference ($uname and $pwd are not <MyDomain> and <MyUserName>). So i replaced the variable with:
my $DSN = "driver={SQL Server};Server=$host;database=$table;";
The results were the same: local login is OK, remote is not. I am running the scripts under my account, which is an ADMIN member on localhost, but is not on the remote machine, which is probbably why it's possible to access the local sql server.
Has anyone got any ideas, why the login is not attempted with the varibles supplied in $DSN? I haven't found any other examples, that would use something other than the $DSN string shown here.
10x, Deda.