Sateesh Yele Microsoft SQL Server Support
Restore of a replicated database fails with the following message.
Msg 3724, Level 16, State 2, Procedure sp_MSdrop_peertopeer_tables, Line 32 Cannot drop the table 'dbo.MSpeer_lsns' because it is being used for replication.
Transactional Replication is set on the database from a script and sp_addarticle was used to Publish some of the replication systems tables (in this case, MSpeer_lsns table). When you try to restore the database, it would fail with the error above message. If you specify KEEP_REPLICATION setting, database comes online but you cannot remove replication objects using sp_removedbreplication procedure.
Is it recommended not to replicate any replication metadata tables. The Create Publication Wizard does not allow system tables to be replicated. These same checks do not occur when you configure Replication using system stored procedures.
In the source database, if any of the replication system tables are marked for replication (like MSpeer_lsns..) using the stored procedures, restore of this database would fail with the above error message.
posted by: Chris Skorlinski