| | | |
| ------------------------- Start Drop Replication ------------------------- |
| PRINT 'Dropping existing Replication...' |
| GO |
| |
| USE master |
| GO |
| |
| -- Set the Replication options to FALSE |
| exec sp_replicationdboption AHD, 'publish', false |
| exec sp_replicationdboption AHD, 'merge publish', false |
| GO |
| |
| -- If Region Servers, then drop the Subscriber NOIDAAHD |
| if @@servername <> N'NOIDAAHD' |
| BEGIN |
| | exec sp_dropsubscriber @subscriber = N'NOIDAAHD' |
| |
| | -- Drop the Distribution Publisher and the Distribution database |
| | exec sp_dropdistpublisher @publisher = @@servername |
| | exec sp_dropdistributiondb N'distribution' |
| | exec sp_dropdistributor |
| | exec sp_dropserver @server = N'NOIDAAHD' |
| END |
| |
| if @@servername = N'NOIDAAHD' |
| BEGIN |
| | exec sp_dropsubscriber @subscriber = N'BANGALOREAHD' |
| | exec sp_dropsubscriber @subscriber = N'CALCUTTAAHD' |
| | exec sp_dropsubscriber @subscriber = N'CHENNAIAHD' |
| | exec sp_dropsubscriber @subscriber = N'DELHIAHD' |
| | exec sp_dropsubscriber @subscriber = N'MUMBAIAHD' |
| |
| | -- Drop the Distribution Publisher and the Distribution database |
| | exec sp_dropdistpublisher @publisher = @@servername |
| | exec sp_dropdistributiondb N'distribution' |
| | exec sp_dropdistributor |
| | exec sp_dropserver @server = N'BANGALOREAHD' |
| | exec sp_dropserver @server = N'CALCUTTAAHD' |
| | exec sp_dropserver @server = N'CHENNAIAHD' |
| | exec sp_dropserver @server = N'DELHIAHD' |
| | exec sp_dropserver @server = N'MUMBAIAHD' |
| END |
| |
| exec master.dbo.xp_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\ComputerAssociates\CA Service Desk\4.0', |
| | N'Replication', N'REG_SZ', 'not installed' |
| |
| PRINT 'Dropping Existing Replication Complete...' |
| ------------------------- Drop Replication Complete ------------------------- |