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.