Browse by Tags

Display the server-level information the application role can currently view.
Published 9 August 7 5:28 AM | SSQA.net
SELECT sid, status, name, dbname, hasaccess, loginname FROM master.dbo.syslogins; GO SELECT spid, kpid, lastwaittype, waitresource, dbid FROM master.dbo.sysprocesses; GO...( read more ) Read More...
Retrieve SessionID and batch information
Published 24 July 7 4:37 AM | SSQA.net
You may be aware using SP_WHO or SP_WHO2 statements you can get information about a session id and statement that is running since good olden days of SQL Server. Within SQL 2005 version you can take help of TSQL: SELECT session_id, text FROM sys.dm_exec_requests...
TSQL to return (display) all tables row count in database - think about performance
Published 16 July 7 4:5 AM | SSQA.net
In the forums and newsgroups this is a very common question that how to get all the tables rowcount or to get optimum values. You may be aware using SELECT COUNT(*) statement, but be aware it will make full table scan to return the rowcount and think...