¿Cómo saber que tablas están replicadas?

For English version visit this link How to know which tables are replicated?
 
A veces es necesario conocer todas las tablas que están replicadas en una BBDD, para ello utiliza estos scripts, ejecutar en la BBDD que este replicada:
--Que tablas están publicadas en Réplica de Mezcla y sus subscriptores
SELECT
b.name AS [Table],
DB_NAME() AS PublisherDB,
a.subscriber_server AS Subscriber,
a.db_name AS SubscriberDB
from sysmergesubscriptions a, sysmergearticles b
where a.pubid=b.pubid
order by a.subscriber_server

--Que tablas están publicadas en Réplica Transaccional y sus subscriptores
SELECT
a.name AS [Table],
is_published AS is_tran_published,
DB_NAME() AS PublisherDB,
c.srvname AS Subscriber,
c.dest_db AS SubscriberDB
FROM sys.tables a
INNER JOIN dbo.sysarticles b ON a.object_id = b.objid
INNER JOIN dbo.syssubscriptions c ON b.artid = c.artid
WHERE is_published = 1

About Fran Lens
SQL Server Analyst at Avanade Spain http://www.lensql.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: