sp_removedbreplication (Transact-SQL)
This stored procedure is executed at the Publisher on the publication database or at the Subscriber on the subscription database. The procedure removes all replication objects from the database in which it is executed, but it does not remove objects from other databases, such as the distribution database.
Note: |
|---|
| This procedure should be used only if other methods of removing replication objects have failed. For more information about these methods, see Removing Replication. |
Transact-SQL Syntax Conventions
- [ @dbname=] 'dbname'
-
Is the name of the database. dbname is sysname, with a default value of NULL. When NULL, the current database will be used.
- [ @type = ] type
-
Is the type of replication for which database objects are being removed. type is nvarchar(5) and can be one of the following values.
tran
Removes transactional replication publishing objects.
merge
Removes merge replication publishing objects.
both (default)
Removes all replication publishing objects.
Reference
System Stored Procedures (Transact-SQL)Other Resources
How to: Disable Publishing and Distribution (Replication Transact-SQL Programming)Removing Replication