Browse by Tags

How to find all the owners of entities contained in a specified schema?
04 October 07 01:00 AM | SQL Master | 2 Comments   
How to find all the owners of entities contained in a specified schema? USE <database_name>; GO SELECT 'OBJECT' AS entity_type ,USER_NAME(OBJECTPROPERTY(object_id, 'OwnerId')) AS owner_name ,name FROM sys.objects WHERE SCHEMA_NAME(schema_id) = '<schema_name>' Read More...
Enhancement to OBJECT_NAME metadata function and a new OBJECT_SCHEMA_NAME metadata function
16 July 07 01:53 AM | SQL Master | 1 Comments   
You may be aware OBJECT_NAME function can be use to return the database object name, I think since SQL 2000 when system functions are used the parameter of a system function is optional, the current database, host computer, server user, or database user Read More...