Pages

Tuesday, February 8, 2011

To FIND the objects created with particular schema


How to find the objects which are all related to particular schema

I do get these kind of questions when ever am free and just passing time on SQL Server

SELECT *FROM sys.database_principals
WHERE [type] IN ('U','S')AND
ISNULL(default_schema_name,'')<>'dbo'

Hope the above query helps

Thanks