views:

330

answers:

1

I'm working on a C# application that queries a SQL Server 2008 Express instance on a remote server (LAN).

When I am at my workstation/dev machine, I can open SQL Server Management Studio and connect to the SQL instance through Windows Authentication, and for all intents and purposes the experience is identical to working in SSMS "on" the server. As far as I can tell, I can do anything from my workstation that I'd be able to do on the server.

That same server hosts an Access 2003 .mdb file, which is set up as a linked server in the SQL instance.

The queries in question return result sets compiled by joining tables from a SQL db and the Access db.

When I execute a query "on" the server, which is to say that I am running SQL Server Management Studio on the server machine, everything works as expected. When I try to run the same queries from my dev machine, however, whether in SSMS or when attempting to run integration tests or debug the application, I can do nothing at all with the linked server. I can see it in SSMS, but any attempt to execute anything results in:

Cannot initialize the data source object of OLE DB provider 'Microsoft.Jet.OLEDB.4.0' for linked server '<DatabaseName>'.

I have looked through many threads relating to this error and have tried many permutations of provider settings, all to no avail.

  • Access DB does not have password (I've tried setting the security to use name "Admin" w/o password)
  • workstation user account has full permissions on server directory where Access DB is located
  • same behaviour was experienced with server as Win XP Pro SP3 and now with Win Server 2003
  • same behaviour was experienced with client as Win XP Pro SP3 and now with Win 7 Pro x32

Works great on the server, never remotely.

Help much appreciated.

A: 

Using SQL Server authentication instead of NT Auth, as suggested by Burnsys, seems to do the trick. The why of the matter seems to be an open question.

Jay
Perhaps the appropriate permissions had not been defined for the NT user groups. I'm not sure what the interaction of SQL Server roles is with linked servers, but that's where I'd start looking.
David-W-Fenton