Browse by Tags

How to find all the owners of entities contained in a specified schema?
Published 4 October 7 3:0 AM | SSQA.net
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...
TSQL to find a login's properties such as password expiration?
Published 23 July 7 7:22 AM | SSQA.net
declare @name nchar ( 100 ) SET @name = '<LoginName' SELECT LOGINPROPERTY ( @name , 'PasswordLastSetTime' ) AS PasswordLastSetTime , LOGINPROPERTY ( @name , 'IsExpired' ) AS IsExpiried , LOGINPROPERTY ( @name , 'IsLocked'...
Filed under: , , , ,