我需要获取为从 MS-SQL 数据库复制而发布的所有表的列表。我可以运行系统存储过程或查询来生成这样的列表吗?
user26901
问问题
73615 次
2 回答
37
于 2010-03-29T17:19:02.370 回答
23
可以查询distribution
数据库以查看发布了哪些文章(表/视图/对象...)以及它们来自哪个出版物。
SELECT
P.[publication] AS [Publication Name]
,A.[publisher_db] AS [Database Name]
,A.[article] AS [Article Name]
,A.[source_owner] AS [Schema]
,A.[source_object] AS [Object]
FROM
[distribution].[dbo].[MSarticles] AS A
INNER JOIN [distribution].[dbo].[MSpublications] AS P
ON (A.[publication_id] = P.[publication_id])
ORDER BY
P.[publication], A.[article];
于 2014-05-16T13:20:31.517 回答