Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OpenRowSet:  Access to SQL Server Permission Denied With Integrated Security

Posted on 2004-10-08
4
Medium Priority
?
1,954 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
4 Comments
 
LVL 3

Accepted Solution

by:
avbsql earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

972 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