January 5, 2005 at 5:44 am
hi all,
Pl. help me in finding the following using SELECT statement or any alternate method,
Regards,
Srinivasan
January 5, 2005 at 5:56 am
sp_who, sp_who2 and sp_lock might be a start. Profiler, which ships with SQL Server is a good tool, but Optimization is up to yourself. To a certain degree is the Index Tuning wizard, which also ships with SQL Server useful.
HTH
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 6, 2005 at 8:11 am
Users in a database is pretty simple...
Select p.SPID, P.STATUS, P.BLOCKED, P.CMD, P.CPU, P.PHYSICAL_IO, P.LAST_BATCH, P.PROGRAM_NAME, P.OPEN_TRAN, P.HOSTNAME, P.LOGINAME
from master.dbo.sysprocesses p (nolock)
join master..sysdatabases d (nolock) on p.dbid = d.dbid
Where d.[name] = 'MASTER' --> database name here
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply