Solved

sp_MSgetmetadatabatch Causing Errors

Posted on 2007-11-15
2
412 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now