连接sql server 2005以通过不同的网络访问

时间:2012-02-02 10:06:51

标签: sql-server ms-access database-connectivity

我正在尝试将我的SQL Server 2005连接到另一个网络上的MS Access。 访问文件保存在共享位置,我拥有所有权限。我使用以下代码


exec sp_addlinkedserver 
@server = N'AccessDb',
@srvproduct = N'Access',
@provider = N'Microsoft.Jet.OLEDB.4.0',
@datasrc = N'\\172.29.2.162\sanjaydb\SYBASE.mdb'




exec sp_addlinkedsrvlogin

@rmtsrvname=N'AccessDb',

@useself=N'False',

@locallogin='infotelgroup\tarun.sachdeva', -- Replace this with the SQL Authenticated account

@rmtuser=N'tarun.sachdeva', 

@rmtpassword= N'asdfasd'


SELECT * FROM AccessDb...Card


并收到错误


OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDb" 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 "AccessDb" 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 "AccessDb".

如何解决这个问题?

0 个答案:

没有答案