DATA Step, Macro, Functions and more

ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

Following Libname statement works in SAS EG but not in Base SAS (when deployed a scheduled job through SAS Mamagement console).

 

BASE SAS:

libname CSCData access path='\\xxxxxx\00. Datastore\xxxxxData1.accdb';

 

ERROR: Connect: The Microsoft Access database engine cannot open or write to the file '\\xxxxxx\00. Datastore\xxxxxData1.accdb'. It is already opened exclusively by another user, or you need permission to view and write its data.
ERROR: Error in the LIBNAME statement.

 

SAS EG:

libname CSCData access path='\\xxxxxx\00. Datastore\xxxxxData1.accdb';
NOTE: Libref CSCDATA was successfully assigned as follows:
Engine: ACCESS
Physical Name: \\xxxxxx\00. Datastore\xxxxxData1.accdb

 

Any solution is greatly appreciated. Is there a OPTION statement to resolve this issue.


Accepted Solutions
Solution
‎01-30-2018 07:56 AM
Occasional Contributor
Posts: 7

Re: ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

Sorry folks, it was a SAS server problem. When I deployed the code in a different SAS server it worked.

View solution in original post


All Replies
Super User
Posts: 9,890

Re: ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

My first guess is that the user used to run the scheduled job does not have the necessary permissions for the accdb file.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Occasional Contributor
Posts: 7

Re: ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

Posted in reply to KurtBremser

User is the same, login with the same ID

Super User
Posts: 13,321

Re: ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

You also need to investigate the first part of the error

 

ERROR: Connect: The Microsoft Access database engine cannot open or write to the file '\\xxxxxx\00. Datastore\xxxxxData1.accdb'. It is already opened exclusively by another user, 

 

If someone else is using the file access is blocked.

Solution
‎01-30-2018 07:56 AM
Occasional Contributor
Posts: 7

Re: ERROR: Connect: The Microsoft Access database engine cannot open or write to the file

Sorry folks, it was a SAS server problem. When I deployed the code in a different SAS server it worked.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 132 views
  • 0 likes
  • 3 in conversation