Solved

sp_MSgetmetadatabatch Causing Errors

Posted on 2007-11-15
2
414 Views
Last Modified: 2008-02-01
I'm running SQL 2000 SP4 publisher with approximately 15 MSDE 2000 pull subscribers.

A few of my users are having problems with replication. This is all done via VPN connections to our site (so they're not on our LAN.)

The merge agent fails with the error "The process could not query row data at the 'Publisher'."

After running Profiler, it appears that the this is the longest duration of anything run.

I can't find any real details on this stored procedure, so I'm not real sure what its doing. I'm also NOT a replication expert. I know enough to have gotten it running and its been working okay, but these problems have slowly been creeping up. We can normally get the synchronization to go through, but its frustrating to my users, and I may be facing a mutiny! Help! I'll be glad to provide any more details that anyone requests, and if anyone has any details on what this stored procedure is doing or how I can find out, that would be most appreciated!
0
Comment
Question by:dday515
2 Comments
 
LVL 7

Accepted Solution

by:
wittyslogan earned 500 total points
ID: 20297847
have you tried sp_helptext it gives you this:

CREATE PROCEDURE sp_MSgetmetadatabatch
      (@pubid uniqueidentifier,
       @tablenickarray varbinary(2000),
       @rowguidarray varbinary(8000)
      )
as
      declare @tablenick int
      declare @rowguid uniqueidentifier
      declare @generation int
      declare @type  tinyint
      declare @lineage varbinary(255)
      declare @colv varbinary(2048)
      declare @retcode             smallint
      declare @saverr             int
      declare @rc                   int
      declare @tnlength            int
      declare @tnoffset            int
      declare @guidoffset            int
      
      /*
      ** To public.
      */
      
      
      if (@tablenickarray is null)
            begin
            RAISERROR(14043, 16, -1, '@tablenick')
            return (1)
            end
      if (@rowguidarray is null)
            begin
            RAISERROR(14043, 16, -1, '@rowguid')
            return (1)
            end
      -- create temp table for returning results
      create table #meta_batch(idx int identity, generation int, type  tinyint,
                   lineage varbinary(255), colv varbinary(2048))

      -- initialize offsets and length for walking through arrays
      set @tnoffset = 1
      set @guidoffset = 1
      set @tnlength = datalength(@tablenickarray)

      -- walk through arrays and populate temp table
      while (@tnoffset < @tnlength)
            begin
            set @tablenick = substring(@tablenickarray, @tnoffset, 4)
            set @rowguid = substring(@rowguidarray, @guidoffset, 16)
            set @generation = 0
            set @type = 0
            set @lineage = NULL
            set @colv = NULL
            exec @rc = sp_MSgetrowmetadata @tablenick, @rowguid,  @generation output,
                   @type  output, @lineage output, @colv output, @pubid
             if @rc <> 0 return @rc
             -- insert values into temp table
             insert into #meta_batch (generation, type, lineage, colv) values
                   (@generation, @type, @lineage, @colv)

             -- bump up offsets for next time through loop
             set @tnoffset = @tnoffset + 4
             set @guidoffset = @guidoffset + 16
            end

      -- select out our result set
      select generation, type, lineage, colv from #meta_batch order by idx
      drop table #meta_batch

      return (0)

does it help at all
0
 

Author Comment

by:dday515
ID: 20299576
That is PHENOMENAL. One of those system stored procedures that I know nothing about. That at least gets me going in the right direction.

THANKS. Accepted as solution.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

806 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