Initializing a Database When Installing Replication

Generate scripts to recreate stored procedures and triggers every time you set up replication.

1 Min Read
ITPro Today logo in a gray background | ITPro Today

When I installed SQL Server 7.0 replication, I chose not to initialize the database. Now I'm getting an error message saying that SQL Server can't find the stored procedure needed for replication. How can I fix this problem?

If you choose the option to initialize the database during replication installation, snapshot replication processing automatically creates the custom stored procedures and triggers that replication needs. But when you initialize the subscriber manually, you need to create the replication stored procedures and triggers manually as well.

To fix the problem, you can generate scripts that will recreate the stored procedures and triggers every time you set up replication. First, choose the immediate update option for the subscriber. Next, run the following stored procedures at the publisher: sp_scriptinsproc, sp_ scriptdelproc, sp_scriptupdproc, and sp_script_synctran _commands. Then, apply the scripts that these stored procedures generate to the subscribing database.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like