Hey there,
If you want to delete all publications and remove all replication objects, you should execute sp_removedbreplication at the Publisher level. However, this does not remove objects from other databases (e.g., distribution database).
You should use:
sp_removedbreplication [ [ @dbname = ] 'dbname' ]
[ , [ @type = ] type ]
dbname is the sysname and type is the type of replication from which you are removing the database objects. The possible values are:
- tran: Removes transactional replication publishing objects
- merge: Removes merge replication publishing objects
- both: Removes all replication publishing objects
Note that sp_removedbreplication cannot be used for a database that is marked as read-only.
Now, execute sp_subscription_cleanup on the on the subscription database to remove any remaining replication metadata in the subscription database.
Hope this helps some, good luck 😎
Natali
"Press any key to continue, where's the ANY key?" 😛 Homer Simpson