Solved

sp_MSgetmetadatabatch Causing Errors

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

920 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

12 Experts available now in Live!

Get 1:1 Help Now