Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Linked Server To Access Database - UNC Filepath

$
0
0

Hi, I'm building a system that involves connecting from SQL Sever 2008 R2 to access 2010 database files on a network location using SQL Linked Servers.

I'm using the ACE.OLEDB.12.0 provider, connecting to an access database using a UNC data path. The code I'm using to add and select from the linked server is:

EXEC sp_addlinkedserver
   @server = N'Test'
  ,@provider = N'Microsoft.ACE.OLEDB.12.0'
  ,@datasrc = N'\\\\server\\share\\folder\\database.accdb'
  ,@srvproduct= N'Access'

The error message this is giving is:

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Test" returned message "Not a valid file name."

After extensive googling, I'm sure that the SQL server is set up correctly - proven by the fact that when replacing @datasrc with the path 'C:\\database.accdb' the linked server is added correctly, and the schema is browsable in management studio's object explorer.

  • ACE provider has properties 'AllowInProcess' = 1 and 'DynamicParameters' = 1
  • SQL config 'show advanced options' = 1, Ad Hoc Distributed Queries' = 1
  • Database engine user has full control access to %windir%\temp and appdata\local\temp
  • Database engine user (and the user that is being impersonated as it runs the SQL query) has full control access to both the share and the full file tree where the .accdb database is stored on the remote server.
  • Database Server can access the UNC file path from windows explorer

Having used procmon to view the files attempted to be accessed by the database process, the UNC path is shown correctly (CreateFile) operation and its result is 'OBJECT PATH INVALID', whereas to me the path seems correct.

I'm at a complete loss as what to do next - it seems to me that there is some kind of issue with connecting to access databases via a UNC file path ... any help on this would be greatly appreciated!

Thanks


   

Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>