Narveson has asked for the wisdom of the Perl Monks concerning the following question:
This setup has been working fine under Windows Server 2003, but now we are trying to migrate to Windows Server 2008, and my database connections are failing.
Here's the error: DBI connect('OurDatabase','',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)
Should I be focusing on specifying a default driver (if so, what and how?), or should I be focusing on the way I set up the OurDatabase data source name?
Thanks to both of you for suggesting DSNless connections. I have gone and verified that I can connect without a DSN by saying
my $connection = 'dbi:ODBC:driver={SQL Server};' . 'Server=OurServer;' . 'Database=OurDatabase;' . 'Trusted_Connection=Yes' ; my $dbh = DBI->connect( $connection, undef, undef, { RaiseError => 1 } );
so this may be my solution. It means changing existing code (did we think we could migrate without any changes?), but it also means I can defer having to figure out the new security model that seems to be hiding my new system DSNs from my legacy code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::ODBC in Windows Server 2008
by Corion (Patriarch) on May 05, 2010 at 07:11 UTC | |
|
Re: DBD::ODBC in Windows Server 2008
by mje (Curate) on May 05, 2010 at 16:23 UTC | |
by Narveson (Chaplain) on May 05, 2010 at 20:59 UTC |