我正在运行以下查询,由于生产数据库正在使用复制,因此我们将添加所有要复制的表(例如。MSpeer_conflictdetectionconfigrequest,MSpeer_conflictdetectionconfigresponse)。
SELECT name FROM sysobjects WHERE type='U' AND name != 'sysdiagrams'我们需要调整这个查询,这样这些表就不会出现。当然,我可以做一个name NOT IN ()并将它们全部列出,但我正在寻找更好的解决方案。
谢谢你的帮助。
发布于 2012-05-21 01:47:35
由于您使用的是SQL2008,因此我建议使用ff:
select * from sys.tables where is_ms_shipped = 0发布于 2012-05-19 23:44:17
SELECT name .
FROM sysobjects
WHERE type='U'
AND name != 'sysdiagrams'
AND replinfo = 0但是:http://msdn.microsoft.com/en-us/library/ms177596.aspx注意到sysobjects和replinfo似乎已被弃用。
0=not replicated
128 = merge - table or indexed view
1=transactional - table or indexed view - log based
3=transactional - table or indexed view - log based with custom sync object
33=transactional - table or indexed view - immediate updating
35=transaction- table or indexed view - log based with custom sync object
and custom filter
129 =merge and transactional - table or indexed view
64 - procs used by immediate updating
512 - all other procsprocs, views, functionshttps://stackoverflow.com/questions/10666590
复制相似问题