Solved

OpenRowSet:  Access to SQL Server Permission Denied With Integrated Security

Posted on 2004-10-08
4
1,833 Views
Last Modified: 2009-09-28
I'm attempting to Import Access Data into SQL Server 2000 (SP3) with OpenRowSet logging into SQL Server with Integrated Security and recieving the following Error: OLE/DB provider returned message: The Microsoft Jet database engine cannot open the file '\\web1\FTP\Montgomery\AgWork.mdb'.

My Query Looks Like This: SELECT * INTO [temp_AgErrorSum] FROM OpenRowSet('Microsoft.Jet.OLEDB.4.0','\\web1\FTP\Montgomery\AgWork.mdb';'admin';'', [AgErrorSum])

My connection string looks like this:  Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Montgomery;Data Source=SQL2

If I execute the query logging in as "sa" in my SQL Server Connection String, everything works just fine.
If I execute the query logging in as a non-sysadmin account, I get the lovely Ad-hoc access is denied error.
But executing with Integrated Security=SSPI, I get the error message at the top.

I've attempted to run this app under both the Administrator Account and as myself (I'm a Domain Admin) and SQL Server has the BUILTIN\Administors account set as a sys-admin role.
I've also set the folder/file permission on the directories to Everone - Full Control and the Drive Share permissions to Everyone - Full Control (just to eliminate any possible permissions issues).  I have no problems at all manually opening the Access Database logged in as administrator or myself.

I'm working with SQL Server 2000 (SP3) and JET 4.0 DB sitting on a Win2K3 server and locally I'm using VB6 on a WinXP SP1 machine.

Any help would be greatly appreciated...
0
Comment
Question by:promap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
avbsql earned 500 total points
ID: 12281048
The issue is that with integrated security. U need to use trusted connection, meaning sql login to do the job. Does the table already exist in sql server or does it need to be created on the fly. Best for this purpose would be to created linked server to the access database from sql server. And then run sql query to fetch the data into sql server. Let me know if this works for you or need more details on linked server.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Job Hung 17 37
access to sql migration 5 23
How can I delete dublicated rows by using for loop in SQL? 2 17
SQL profiler 3 12
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question