Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error 7353 with Distributed Query?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-11-11 : 10:26:17
Shaun writes "Server: Msg 7353, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.


When executing a distributed query against a linked server, This error occurs on just one table. The other tables in the same database execute fine.

The SQL 7.0 query is simple:

SELECT * FROM DOITRPT1.ChangeManage.dbo.TeamMembers


I have tried deleting and replacing the server in the Linked Servers list. No help.

Stumped,
--Shaun"

nr
SQLTeam MVY

12543 Posts

Posted - 2002-11-11 : 11:20:57
Have a look at the remote query thgat is generated in the query plan.

I suspect it is to do with the select * or some strange column name.
Try naming the columns instead of select *.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

SMerrill
Posting Yak Master

206 Posts

Posted - 2002-11-12 : 14:09:05
The remote query that is generated in the query plan is:
SELECT
Remote1001."userid" Col1002,
Remote1001."firstname" Col1003,
Remote1001."LastName" Col1004
FROM "ChangeManage"."dbo"."TeamMembers" Remote1001
The remote table is scripted as follows:
CREATE TABLE [dbo].[TeamMembers] (
[UserID] [varchar] (25) NOT NULL ,
[FirstName] [varchar] (50) NULL ,
[LastName] [varchar] (50) NULL
)
ALTER TABLE [dbo].[TeamMembers] WITH NOCHECK ADD
CONSTRAINT [PK_TeamMembers] PRIMARY KEY NONCLUSTERED
([UserID]) WITH FILLFACTOR = 90
There is no difference in the remote query that is generated in the query plan when I name all the columns.

May I also mention that there are no tables shown in the following list in Enterprise Manager tree structure:
<LocalServerName> | Security | Linked Servers | DOITRPT1 | Tables.
The reason for this, according to the profiler and my limited debug skills, is that the procedure
exec master..sp_tables_ex N'DOITRPT1' , null, null, null, '''TABLE'''
returns no records. This is because there are no records of type 'TABLE' registered. But I don't know why.

--SMerrill
Seattle, WA
Go to Top of Page
   

- Advertisement -