?
Solved

sp_MSgetmetadatabatch Causing Errors

Posted on 2007-11-15
2
Medium Priority
?
422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
wittyslogan earned 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

752 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