]
 
Welcome Guest ] ]
Name:
Pass:
Auto Login
Add me to Active Users list
Yes  No

Forgot password? | Register

Site Navigation

   
SQL/ODBC
 Mirtheil Software Forums»SQL/ODBC
Subject Topic: SQL Server 2005 Linked Server Post ReplyPost New Topic
Forum Jump  
Author
Message Prev Topic | Next Topic 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 14 April 2009 at 9:05pm | IP Logged Quote ecichy

I am trying to set up a linked server from SQL Server 2005 to Pervasive SQL V10. I would like to know what the values for each entity within the "New Linked Server"  screen are. I am using the Server Management Studio to set up the link. I am trying to set up the best link to the "demodata" source installed by Pervasive. From the information I've come across, I can use the PervasiveOLEDB or Microsoft OLE DB Provider for ODBC Drivers. I am looking for the values for Product name, Data source, Provider string, Location and Catalog for each of the two Providers.

My potential client is a Microsoft SQL Server 2005 shop, while I am a long-time Btrieve \ Pervasive SQL developer. I have set up a test server with Windows Server 2003 and Pervasive SQL V10 as well as Microsoft SQL Server 2005 Standard Edition installed. I was able to set up a linked server using the Microsoft for ODBC setup and able to query the "billing" table and get results. I'm pretty sure that I don't have the ideal setup of the linked server as I can't see any method of displaying all of the tables in demodata. Since I know the table names via the Pervasive Control Center, I was able to issue select * from hcsi.demodata.."billing" and display results.

My potential client has a setup of SQL Server 2005 Enterprise Edition set up on a Windows Vista Ultimate workstation. He as numerous linked servers to other SQL 2005 instances on other servers. We ultimately would like to create a linked server on his workstation to a Pervasive SQL Server. I had my test server up in his network. He was using sp_addlinkedserver to attempt to create the linked server. While we received a successful linked server execution using the MSDASQL setup to an ODBC entry on his workstation via the Pervasive V10 Client install and an ODBC entry to demodata, we were not able to execute a select statement without an error. This is why I'm going back to square one to set this up properly. I have opened a support ticked with Pervasive, but have not yet received a response. I have seen Mirtheil's answers on every other forum I've been on, so I'm coming to the horse's mouth for an answer. 

 

 

Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
mirtheil
Admin Group


Admin Group

Joined: 09 February 2006
National Flag of United States United States
Posts: 209
Posted: 15 April 2009 at 12:22pm | IP Logged Quote mirtheil

I would not recommend using OLEDB with a Linked Server.  I would suggest using ODBC.  You said that it worked on your test machine but not at the client site. 
What error was being returned? 

As far as the options, here: ODBC:
EXEC sp_addlinkedserver
   @server = 'pvswdemodata',
   @srvproduct = '',
   @provider = 'MSDASQL',
   @datasrc = 'DEMODATA';

@server is the name you want to call the linked server
@provider is the provider's name (MSDASQL is the ODBC driver)
@datasrc is the ODBC DSN. 


I haven't been able to get the OLEDB working but I'm using SQL Server 2008. 
Back to Top Printable version View mirtheil's Profile Search for other posts by mirtheil Visit mirtheil's Homepage
 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 15 April 2009 at 2:23pm | IP Logged Quote ecichy

We were able to set up the link using the EXEC sp_addlinkedserver from the Client workstation with SQL Server 2005 and Pervasive Client V10 installed. We set up a System ODBC entry on the workstation named EDTEST which used the Pervasive Client ODBC driver. We pointed it to DEMODATA on the Pervasive Server. While the procedure executed successfully, we received an error when attempting to expand the Catalogs entry under the linked server. We also received another error when attempting a select * from hcsi.edtest..billing or select * from hcsi.edtest.."Billing". This had an error code 998 against the Pervasive Client ODBC driver. I don't have the exact messages in front of me, but I will get the exact messages and post them on the forum. I am attempting to reproduce my Client's environment by setting up a Vista Ultimate virtual PC. I will install the Pervasive Client V10 and make sure that I can connect to my Pervasive V10 server. I would like to establish an SQL Server 2005 to Pervasive link on the server first using the Server Management Studio. Hopefully, I'm missing some information that makes it able to see the tables under the linked Pervasive server. If I don't have an answer from Pervasive soon, I'll probably install SQL Server 2005 on my Vista Ultimate Virtual PC and attempt to generate the error messages received during my test at the Client site.
Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
mirtheil
Admin Group


Admin Group

Joined: 09 February 2006
National Flag of United States United States
Posts: 209
Posted: 15 April 2009 at 3:37pm | IP Logged Quote mirtheil

I tested with SQL Server 2008 on my Vista laptop and was able to get the list of tables in the Catalogs under the Linked Servers.  I don't have SQL Server 2005 to test with though. 
I would be curious to see the entire message.
Back to Top Printable version View mirtheil's Profile Search for other posts by mirtheil Visit mirtheil's Homepage
 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 16 April 2009 at 12:32am | IP Logged Quote ecichy

I was able to establish a linked server from SQL Server 2005 to Pervasive demodata using both the EXEC sp_addlinkedserver in a Query window as well as a right-click new linked server under the Server Objects \ Linked Servers in the Server Management Studio. The linked server appears but I don't see a way to display the tables. I was able to list the tables in demodata using EXEC sp_tables_ex. Both Pervasive and SQL Server are on the same machine. I'm now going to uninstall SQL Server on the Pervasive machine and install it on a Vista Ultimate Virtual PC on another machine and go through this process again. I'll post the results.
Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 17 April 2009 at 2:49am | IP Logged Quote ecichy

Spent all day and night applying service packs to get my environment set up to test linked server. I have a Vista Ultimate Virtual PC with SQL Server 2005 and the Pervasive Client V10.10 installed. I set up an ODBC entry using the Pervasive ODBC Client driver named EdTest pointing to DEMODATA on my Pervasive server. I received a "command completed successfully" when executing the sp_addlinkedserver. My linked server name is 'hcsi' and my ODBC entry is 'EdTest' I executed  select * from hcsi.EdTest.."Billing" and received the following:

OLE DB provider "MSDASQL" for linked server "hcsi" returned message "Unspecified error:.

OLE DB provider "MSDASQL" for linked server "hcsi" returned message "[Pervasive] [ODBC Client Interface] [LNA] [Pervasive] [ODBC Engine Interface] [Data Record Manager] Cannot locate the named database you specified (Btrieve Error 2301)".

Msg 7311, Level 16, State 2, Line 1

Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "MSDASQL" for linked server "hcsi". The provider supports the interface, but returns a failure code when it is used

Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 17 April 2009 at 3:13am | IP Logged Quote ecichy

Very strange! Although I have an ODBC entry named EdTest defined and I created the linked server with EdTest as the @datasrc I issued the following and retrieved data:

select * from OPENQUERY (hcsi, 'select * from demodata.billing')

 

I received the 2301 error when attempting to use EdTest.billing in the above statement.

Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
ecichy
Newbie


Newbie

Joined: 14 April 2009
National Flag of United States United States
Posts: 6
Posted: 17 April 2009 at 4:01am | IP Logged Quote ecichy

Finally got this to work! I removed the EdTest ODBC entry and created a new one named "demodata" which pointed to demodata on the server. I created the linked server and was able to execute select * from hcsi.demodata..billing to get results. Seems like there's something lost in the translation.

I just tried setting up the linked server via the Management Studio right-click "new linked server" method. I used the "Microsoft OLE DB Provider for ODBC" , Product Name = Pervasive,  and Data source demodata. The linked server appears and actually expands to show all of the DB Names (DEFAULTDB, DEMODATA, PERVASIVESYSDB, and TEMPDB). DEMODATA further expands to show Tables and Views. Further expanding the Tables shows the results I was expecting.

Since I was on a roll, I started playing with setting up the linked server in the Management Studio using the Pervasive OLE DB Provider. While it creates the linked server, expanding the Catalogs aborts with the cannot locate "DBSCHEMA_TABLES" error code 7399. Probably need a correct entry for Catalog when setting up the linked server. I had to use my server name in the Location field. I tried demodata in the Catalog field, but no luck.

Back to Top Printable version View ecichy's Profile Search for other posts by ecichy Visit ecichy's Homepage
 
stitch
Newbie
Avatar

Newbie

Joined: 23 April 2009
National Flag of South Africa South Africa
Posts: 1
Posted: 23 April 2009 at 4:22am | IP Logged Quote stitch

Hi,

I am trying to create a linked server in SQL 2005 to a Timberline database - have done exactly what you say above - but I cannot get the connection to work.  If I use Visual Studio VB 2008 I can get a link using the Microsoft.Data.ODBC namespace but I can't get a link using the System.Data.ODBC namespace??  Ideally I want a linked server so I can run a stored procedure to update a SQL database from the Timberline Pervasive database...but when I create a linked server - using exactly what you say above - Microsoft OLE Provider for ODBC, Product=Pervasive and data source = Timberline - the query just carries on executing - never stops - I have seen on the internet that many people have this problem - but no solution!  I am wondering it if is the way Timberline is built - to run on top of Pervasive - as when you do a manual link using the ODBC Admininstrator using the Pervasive driver, it gives you the option to link to a Timberline Database - but when you use the Timberline Driver -you then get to link directly to a folder that holds Timberline data...is there a solution for this?  Many thanks
Back to Top Printable version View stitch's Profile Search for other posts by stitch Visit stitch's Homepage
 
vagnersantos
Newbie


Newbie

Joined: 16 November 2009
National Flag of Brazil Brazil
Posts: 1
Posted: 16 November 2009 at 10:25am | IP Logged Quote vagnersantos

I faced the same message status.
It's not finding the database File.

Try this configuration:

Driver        (OLEDB for ODBC)
datasource (your system dsn name for pervasive db)
location       (db servername)
catalog        (database file name)
Back to Top Printable version View vagnersantos's Profile Search for other posts by vagnersantos
 
Forum Jump  

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic

  ] ]
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum
Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide

Content Copyright © 2000 - 2010 Mirtheil Software.Powered by SOOP Portal Raven 1.0