Solved

How do I configure a Linked Server in Microsoft SQL Server 2008 to use Microsoft Visual Fox Pro OLE DB as the provider?

Posted on 2009-05-14
2
367 Views
Last Modified: 2012-05-07
When I try to setup a Linked Server in Microsoft SQL Server 2008 to use Microsoft Visual Fox Pro OLE DB as the provider, I cannot query the data source.  Can you provide the syntax needed to setup the new linked server (e.g., data source, product name, provider string, etc.).
0
Comment
Question by:Sparqware
2 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 125 total points
Comment Utility
I've created linked server named fox, scripted it and the result works. Now it is possible to execute SQL commands on VFP tables in specified folder (e.g. select * from fox...TblName).

FYI, the linked server function failed if the datasrc path contained spaces.

What is your error message when testing the connection to linked server?

/****** Object:  LinkedServer [FOX]    Script Date: 05/14/2009 21:16:32 ******/

EXEC master.dbo.sp_addlinkedserver @server = N'FOX', @srvproduct=N'', @provider=N'VFPOLEDB', @datasrc=N'd:\LinkFox\'

 /* For security reasons the linked server remote logins password is changed with ######## */

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'FOX',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
 

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'collation compatible', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'data access', @optvalue=N'true'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'dist', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'pub', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'rpc', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'rpc out', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'sub', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'connect timeout', @optvalue=N'0'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'collation name', @optvalue=null

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'lazy schema validation', @optvalue=N'false'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'query timeout', @optvalue=N'0'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'use remote collation', @optvalue=N'true'

GO
 

EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'remote proc transaction promotion', @optvalue=N'true'

GO
 

-- some resources recommend to execute:

EXEC master.dbo.sp_MSset_oledb_prop N'VFPOLEDB', N'AllowInProcess', 1 

GO 

Open in new window

0
 

Author Closing Comment

by:Sparqware
Comment Utility
It turns out my problems were related to the AllowInProcess property.  Once I set that to yes, then it worked fine.  Thanks!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now