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.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Linked server sql to access database

Author  Topic 

egemen_ates
Yak Posting Veteran

76 Posts

Posted - 2013-03-24 : 14:37:03
I have two server

Server A -- Sql server 2008

server B MS Access

I define linked server Sql server to Ms Access.using this command.

EXEC sp_addlinkedserver
@server = N'test4',
@provider = N'Microsoft.ACE.OLEDB.12.0',
@srvproduct = N'Access',
@datasrc = N'\\192.168.1.9\TESTSERVER\ACCESS.mdb',
@provstr = N';PWD=ABC'

after execute this command

SELECT * FROM test4...EMPLOYEES
this commandd execute succesfuly.

after create sql server agent job
and job step command
SELECT * FROM test4...EMPLOYEES
and execute job but given error
error is :

executed as user deneme\egemen cannot initialize the datasource object of oledb provider "Microsoft.ACE.OLEDB.12.0" for linked server test4[sql state 42000] error [7303]
test4 returned message:the microsoft access database engine cannont open or write \\192.168.1.9\TESTSERVER\ACCESS.mdb. it is already opened exclusive by another user you need permission view or write data

how can i solve this problem tahnk you


James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-03-24 : 14:52:37
Does anyone have the access file opened exclusively?

If that is not the problem, check if the login account used to run the SQL Server agent has access to that folder and the mdb file. You can find the login account from SQL Server Configuration manager (in SQL Server Program group) or run
wmic service where "name Like '%Agent%'" get Name , StartName
Go to Top of Page

egemen_ates
Yak Posting Veteran

76 Posts

Posted - 2013-03-24 : 15:19:01
I solve problem i open configuration manager change sql server and sql server agent user

This operation maybe create some problem is it possible ?

quote:
Originally posted by James K

Does anyone have the access file opened exclusively?

If that is not the problem, check if the login account used to run the SQL Server agent has access to that folder and the mdb file. You can find the login account from SQL Server Configuration manager (in SQL Server Program group) or run
wmic service where "name Like '%Agent%'" get Name , StartName


Go to Top of Page
   

- Advertisement -