Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2003
    Posts
    5

    Unanswered: Inconsistent metadata. Error 7352.

    Howdy all. I am getting an error with SQL Server 2000. I am pulling data from one server to another using Linked Servers. I am getting the following error:

    OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. The object '[<IP>].[<Database>].[dbo].[<Table>]' was missing expected column '<ColumnName>'. [SQLSTATE 42000] (Error 7352).

    The perplexing thing to me about this problem, is that I am getting the error when I run a particular stored procedure within a SQL Server Agent Job. However, I run the stored procedure several times within that job, and it works the first couple of times. It fails on the same job step every time, but yet it works on other steps that do the same thing -- just with different tables and columns.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    You may have already tried this - but have you deleted the step and added the step back ?

  3. #3
    Join Date
    Jan 2003
    Posts
    5
    No, I have not tried this yet, but I will try it. I am having this problem at several servers which are all pulling from the same linked server.

    Thanks for the suggestion.


    Originally posted by rnealejr
    You may have already tried this - but have you deleted the step and added the step back ?

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    Was a column (or anything else) modified/deleted ?

  5. #5
    Join Date
    Jan 2003
    Posts
    5
    No. I thought of that, too. Nothing has been done to the table or its columns.


    Originally posted by rnealejr
    Was a column (or anything else) modified/deleted ?

  6. #6
    Join Date
    Feb 2002
    Posts
    2,232
    Let me know if deleting the step works - something may have gotten corrupted.

  7. #7
    Join Date
    Jan 2003
    Posts
    5
    I deleted the whole SQL Agent job and readded it. I am still getting the inconsistent metadata error. It happens on and off. It will work sometimes for several of the servers that are pulling data, but most of the time I get the metadata error.

  8. #8
    Join Date
    Feb 2002
    Posts
    2,232
    Is it the same column/table every time ? If so, what is the data type of the column ? Are you linking to sql server 2000 servers only ? Do you know where it is failing within the sp - can you post the code where it is failing ?

  9. #9
    Join Date
    Jan 2003
    Posts
    5
    It is the same table/column everytime. It is the same step in the job every time. The sp is executed several times within the job, and it works successfully several times, but when it fails it always fails on this step. Here is the code that it is failing on:
    ----------------------------------------------
    SELECT @Command = @Command + 'DECLARE tmpCursor CURSOR READ_ONLY FOR' + Char(13)
    SELECT @Command = @Command + 'SELECT distinct ' + Char(13)
    SELECT @Command = @Command + ' o.O_ID' + Char(13)
    SELECT @Command = @Command + 'FROM' + Char(13)
    SELECT @Command = @Command + ' [' + @SourceServerName + '].Mugshot.dbo.Objects o,' + Char(13)
    SELECT @Command = @Command + ' [' + @SourceServerName + '].Mugshot.dbo.SubObjects so,' + Char(13)
    SELECT @Command = @Command + ' [' + @SourceServerName + '].Mugshot.dbo.FieldInstanceObjects fio,' + Char(13)
    SELECT @Command = @Command + ' ' + @DestImageTableName + ' i,' + Char(13)
    SELECT @Command = @Command + ' xFer_R_ID r' + Char(13)
    SELECT @Command = @Command + 'WHERE' + Char(13)
    SELECT @Command = @Command + ' r.R_ID = i.Parent_R_ID AND' + Char(13)
    SELECT @Command = @Command + ' i.' + @DestImageColumnName + ' = fio.FI_ID AND' + Char(13)
    SELECT @Command = @Command + ' fio.O_ID = o.O_ID AND' + Char(13)
    SELECT @Command = @Command + ' so.Full_O_ID = o.O_ID' + Char(13)
    ----------------------------------------------

    Basically, I am declaring a cursor within a string, so the SourceServer can be dynamically specified. All SourceServer's are SQL Server 2000. I use Linked Servers to access the SourceServer's (sp_addlinkedserver).

    Thanks for your time.

    Originally posted by rnealejr
    Is it the same column/table every time ? If so, what is the data type of the column ? Are you linking to sql server 2000 servers only ? Do you know where it is failing within the sp - can you post the code where it is failing ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •