Link to home
Start Free TrialLog in
Avatar of PMH4514
PMH4514

asked on

problem with linked server authentication

Hello,
The attached snippet is code I use to try to create a linked server to an Access database file.  I can run it, it runs without errors and the linked server shows up in the linked servers list.

Problem is when I try to query it, with for example:

select * from UTILITYDB...worklist

I see this in the output window:

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "UTILITYDB" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "UTILITYDB" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 1      
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "UTILITYDB".

How do I resolve this?

Thanks!

EXEC master.dbo.sp_addlinkedserver @server = N'UTILITYDB', @srvproduct=N'Access 97', @provider=N'Microsoft.Jet.OLEDB.4.0', @datasrc=N'E:\utility\utility.mdb'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'UTILITYDB',@useself=N'True',@locallogin=NULL,@rmtuser=username,@rmtpassword=password
 
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'UTILITYDB', @optname=N'use remote collation', @optvalue=N'true'

Open in new window

Avatar of Aneesh
Aneesh
Flag of Canada image

can you close all the connections to that access 97 database and try again
Avatar of PMH4514
PMH4514

ASKER

there are no active connections to the database when I try this.
did you cross chek the path 'N'E:\utility\utility.mdb''
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514

ASKER

yes the path is correct.

when I run sp_testlinkedserver against it, I see the same output as in my first post.  I also found this thread:

https://www.experts-exchange.com/questions/24075537/Problem-with-SQL-Server-Linked-to-MS-Access-MDB.html

which went unanswered and seems to describe my problem but shows no solution. The database file is password protected, and I have given 'everyone' full control permissions on it.
Avatar of PMH4514

ASKER

additionally - I removed the password from the Access file, and still have the same results.