Avatar of CommunispaceIT05
CommunispaceIT05

asked on 

SQL 2005 won't insert Linked Server data into temp table

I have 2 SQL 2005 servers in the following configuration:

- SQL2005-1 includes a linked server to SQL2005-2 (using SQL Native Client provider)
- SQL2005-2 has a database named 'filesearch' (with stored procedure named 'app_filesearch') and an index linked server named 'qasite1'

From SQL2005-1, I'm able to issue:

   exec [SQL2005-2].filesearch.dbo.app_filesearch

and get valid results. If I attempt, on SQL2005-1, to stuff these results into a temp table:

   create table #files ([filename] varchar(255))
   insert into #files
   exec [SQL2005-2].filesearch.dbo.app_filesearch

I get the following error:

   The requested operation could not be performed because OLE DB provider "MSIDXS" for linked server "qasite1" does not support the required transaction interface.

Here are the contents of the app_filesearch SP:

   set nocount on
   set quoted_identifier off
   SELECT * FROM OPENQUERY(qasite1, 'SELECT FileName FROM SCOPE() WHERE CONTAINS( Contents, ''"bug"'')')

I have tried changing the SELECT statement and found that if I remove the OPENQUERY portion (and use a simple SELECT * FROM some_table) the results are successfully placed into my temp table.

I've tried changing the settings on the MSIDXS provider in SQL 2005 but that made no difference.

Also, this same procedure works fine when SQL2005-2 is replaced with SQL 2000.
Microsoft SQL Server 2005Microsoft SQL Server

Avatar of undefined
Last Comment
CommunispaceIT05
Avatar of rboyd56
rboyd56

What happens fi you execute this SQL2005-2:

create table #files ([filename] varchar(255))
   insert into #files
   exec filesearch.dbo.app_filesearch
Avatar of CommunispaceIT05

ASKER

It works fine when running locally on SQL2005-2
Avatar of rboyd56
rboyd56

There are some limitations with the Index server driver that limit it to local queries. This may have something to do with the error.
Avatar of CommunispaceIT05

ASKER

If that's the case, why does it work if I don't try and stuff the results into a temp table?

Again:

    exec [SQL2005-2].filesearch.dbo.app_filesearch

works fine, while

   insert into #files
   exec [SQL2005-2].filesearch.dbo.app_filesearch

fails (against SQL 2005 index server, works fine against SQL 2000).
ASKER CERTIFIED SOLUTION
Avatar of rboyd56
rboyd56

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of CommunispaceIT05

ASKER

That works, but isn't the preferred solution (it involves code change that will require more testing than getting it to work as-is).

Any pointer as to where these limitations of MSIDXS are defined?
Avatar of rboyd56
rboyd56

I do not know of any publicly available listings of the limitations.
Avatar of CommunispaceIT05

ASKER

This site went from awesome to awful practically overnight.
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo