The following script was made as a requirement to check if there are databases that are subscribing in an instance.
This can be executed on any database.
This can be executed on any database.
Create table #TempTable
(
DB varchar(100),
Is_Subscriber varchar(10));
EXECUTE sp_MSforeachdb 'USE [?];
if exists (SELECT name FROM sys.sysobjects WHERE name = ''MSreplication_subscriptions' ')
begin
insert into #TempTable values (db_name(), ''YES'');
END'
select * from #temptable
drop table #TempTable
Comments
Post a Comment