Solved

sp_MSgetmetadatabatch Causing Errors

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Sum Over Multiple Tables 20 35
How come this XML node is not read? 3 31
SQL Server Compression Decision 5 48
Need a mirrored QA test site 2 17
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

730 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