Thursday, 29 August 2013

Query ACE OLEDB Linked server when the file is already in use

Query ACE OLEDB Linked server when the file is already in use

My linked server works properly when nobody is using the file. However as
soon someone takes control of it, I can't read it anymore.
I only need read access over the file and I need the file to be accessible
by the server and others at the same time.
Tryed to use it in read only mode but without success. Any idea would be
appreciated!
Thank you very much !
Here is my Linked Server config:
/****** Object: LinkedServer [MasterFond] Script Date: 08/29/2013
10:23:07 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'MasterFond',
@srvproduct=N'Excel', @provider=N'Microsoft.ACE.OLEDB.12.0',
@datasrc=N'G:\Grp_Energie\Administratif\Corporatif\Fonds
investissement\Comptabilité\Master_Fonds dinvestissement.xls',
@provstr=N'Excel 12.0;HDR=No;'
/* For security reasons the linked server remote logins password is
changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname=N'MasterFond',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond',
@optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'data
access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'dist',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'pub',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'rpc',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'rpc
out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'sub',
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'connect
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond',
@optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'lazy
schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'query
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'MasterFond', @optname=N'use
remote collation', @optvalue=N'true'

No comments:

Post a Comment