[mssql] Snapshot Agent shows an errormsg “Invalid object Sysarticles.’ while reinitializing.

Couple days ago, We restored database so I had to reinitialize transaction replication to our development system.  After I reinitalizing all articles and subscriptions I reran a snapshot agent manually then shows an errormessage “Invalid object name sysarticles”.

I thought I have added sysarticles table as article accidently. But no I haven’t.
So I ran a SQl Profiler to capture that query(or a procedure that references sysarticles table) and I got the proc.

sp_scriptinsproc

A system procedure that generates a script for Insert Statements that references sysarticles.
As we know sysarticles tables is a system table that created into each publishing databases.
 If publishing database has no proc then sql server looking for master database to execute that procedure. There is no reason  master database should have sysarticles table unless you don’t set master database as a publisher.

So here is a simple solution.
Scripting sp_scriptinsproc procedure from master database(or other database) and generates it into publisher database.
And rerun snapshot agent you will never see that errormessage again.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.