Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jenitha
Starting Member
1 Post |
Posted - 2005-10-01 : 03:04:36
|
| Hi,I am new to SQL Server.This is the set up.We have a domain server, sql server and web server running on three different PCs. I am running a PERL code in the web server and accessing the sql server. I am getting errors. I have pasted the piece of my code and error below. Could someone please help.Thanks and Regards,Jeni.Code:----my $DSN = 'driver={SQLServer};Server=$server;database=$database;uid=$user;';my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n";Error:------DBI connect('driver={SQLServer};Server=$server;database=$database;uid=$user;','',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at test.pl line 15[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-10-01 : 04:44:04
|
| From the error message it doesn't look like you have any values set up in the Perl variables for $server, $database or $user. You're going to need a password for the user too - unless you are using Windows Authentication.Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-01 : 05:51:01
|
| >>Data source name not found If you used DSN name, make sure you spelled it correctlyMadhivananFailing to plan is Planning to fail |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-10-01 : 09:02:45
|
| Also, this section should be changed to:driver={SQL Server}; |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-10-01 : 11:07:02
|
| You might want to have a look at this:http://www.connectionstrings.com/MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|