Find out distributor and publisher info in Sql Server replication (摘)
来源:互联网 发布:淘宝活动封面 编辑:程序博客网 时间:2024/05/30 04:38
--********** Execute at the Distributor in the master database **********--
use master
go
--Is the current server a Distributor?
--Is the distribution database installed?
--Are there other Publishers using this Distributor?
exec sp_get_distributor
--Is the current server a Distributor?
select is_distributor from sys.servers where name='repl_distributor' and data_source=@@servername
--Which databases on the Distributor are distribution databases?
select name from sys.databases where is_distributor = 1
--What are the Distributor and distribution database properties?
exec sp_helpdistributor
exec sp_helpdistributiondb
exec sp_helpdistpublisher
--********** Execute at the Publisher in the master database **********--
--Which databases are published for replication and what type of replication?
exec sp_helpreplicationdboption
--Which databases are published using snapshot replication or transactional replication?
select name as tran_published_db from sys.databases where is_published = 1
--Which databases are published using merge replication?
select name as merge_published_db from sys.databases where is_merge_published = 1
--What are the properties for Subscribers that subscribe to publications at this Publisher?
exec sp_helpsubscriberinfo
--********** Execute at the Publisher in the publication database **********--
use AdventureWorks
go
--What are the snapshot and transactional publications in this database?
exec sp_helppublication
--What are the articles in snapshot and transactional publications in this database?
--REMOVE COMMENTS FROM NEXT LINE AND REPLACE with the name of a publication
--exec sp_helparticle @publication=' ‘
--What are the merge publications in this database?
exec sp_helpmergepublication
--What are the articles in merge publications in this database?
exec sp_helpmergearticle --to return information on articles for a single publication, specify @publication='
--Which objects in the database are published?
select name as published_object, schema_id, is_published as is_tran_published, is_merge_published, is_schema_published
from sys.tables where is_published = 1 or is_merge_published = 1 or is_schema_published = 1
union
select name as published_object, schema_id, 0, 0, is_schema_published
from sys.procedures where is_schema_published = 1
union
select name as published_object, schema_id, 0, 0, is_schema_published
from sys.views where is_schema_published = 1
--Which columns are published in snapshot or transactional publications in this database?
select object_name(object_id) as tran_published_table, name as published_column from sys.columns where is_replicated = 1
--Which columns are published in merge publications in this database?
select object_name(object_id) as merge_published_table, name as published_column from sys.columns where is_merge_published = 1
- Find out distributor and publisher info in Sql Server replication (摘)
- SQL Server 改名 和 Replication, Distributor
- New replication features in SQL Server 2008 and what they mean to you
- 取消一个Distributor或者Publisher
- sql: MySQL and Microsoft SQL Server Stored Procedures IN, OUT using csharp code
- sql: MySQL and Microsoft SQL Server Stored Procedures IN, OUT using csharp code
- XML Publisher and Out of Memory Errors
- Using WebLogic Server Clusters , Failover and Replication in a Cluster
- Free, simple code to find out what SQL statements are running slow in SQL Server right now
- SQL Server-- Replication
- SQL Server Replication
- SQL Server Replication II
- SQL server replication
- SQL Server Replication
- SQL Server订阅与发布 [进程无法连接到 Distributor]
- Find out all currenct connections in for Oracle SQL
- Find Nth maximum value in SQL Server
- SQL in ORACLE and SQL Server
- 一些基本的widgets
- Android 技术专题系列之二 -- telephony
- 浮动层JS类,兼容IE和Firefox
- Android 技术专题系列之三 -- 编译(build) 流程
- Android 技术专题系列之四 -- 网络资源及常见命令备
- Find out distributor and publisher info in Sql Server replication (摘)
- 转:090623
- OGRE缓冲鼠标键盘输入的一个小疏忽
- JProbe Suite 4.0使用说明
- SWT(JFace)体验之Label增亮显示
- 瞭望东方周刊:通信让世博更精彩
- js提交表单
- MCC出现错误这样的 ERROR 1251: Client does not support authentication pro 解决方法
- ASP.NET FCKeditor 集成