How to query for users on a machine
qwinsta /server:<serverName> OR quser /server:<serverName>
How to log a user off of a machine
logoff <sessionId> /server:<serverName>
Sunday, July 31, 2011
Friday, July 1, 2011
Dependency information on my table
To find out what depends on the table you are about to alter or drop.
SELECT referencing_schema_name, referencing_entity_name
FROM sys.dm_sql_referencing_entities(' schema_name.referenced_entity_name ' , ' <referenced_class> ' )
additional information<
{referenced_class> ::=OBJECT| TYPE
| XML_SCHEMA_COLLECTION| PARTITION_FUNCTION}
SELECT referencing_schema_name, referencing_entity_name
FROM sys.dm_sql_referencing_entities(' schema_name.referenced_entity_name ' , ' <referenced_class> ' )
additional information<
{referenced_class> ::=OBJECT| TYPE
| XML_SCHEMA_COLLECTION| PARTITION_FUNCTION}
Subscribe to:
Posts (Atom)