Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

How do i get the list of all Tables, Views, Stored procedures that are NOT added in a publication for replication?Can you help me to make the stored Proc for that?I am new to Replication....Thanks

share|improve this question

2 Answers 2

up vote 1 down vote accepted

For Snapshot and Transactional:

SELECT
    name 
FROM sysobjects WITH (NOLOCK) 
WHERE ((xtype = 'U') OR (xtype = 'V') OR (xtype = 'P')) AND 
    category <> 2 AND 
    name NOT IN (SELECT DISTINCT object_name(OBJID) FROM sysarticles)

For Merge:

SELECT
    name 
FROM sysobjects WITH (NOLOCK) 
WHERE ((xtype = 'U') OR (xtype = 'V') OR (xtype = 'P')) AND 
    category <> 2 AND 
    name NOT IN (SELECT DISTINCT object_name(OBJID) FROM sysmergearticles)
share|improve this answer
    
thanks a lot @brandon Williams –  Rajni Patel Apr 11 '13 at 6:23

To know the entire information about Tables and stored Procedures and views

Check this link:

http://codedada.com/how-to-get-entire-information-about-sqlserver-database/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.