[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.


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.

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

This site uses Akismet to reduce spam. Learn how your comment data is processed.