June 12, 2008 at 3:16 pm
Hi everybody, can some one give me a stored procedure or any thing which can help me to get .
Thanks
June 13, 2008 at 12:02 am
Hi,
select @@servername
Will return the name of the current server.
Cheers,
John
June 13, 2008 at 12:25 am
Use the 2 DMVs sys.dm_exec_requests and sys.dm_exec_sessions to see details of who is running queries against the server. You can join in the function sys.dm_exec_sql_text to get the details of what they are running. (the function gives the full create script of a procedure if the user is running the pocedure.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 13, 2008 at 12:55 am
Using Profiler, it is possible to get which user is calling which stored procedure from which host.
June 13, 2008 at 1:08 am
use sp_who or sp_who2 active
June 13, 2008 at 8:52 am
Thanks Shaw, but these are almost same like sysprocesses in sql2000 system table , i can use these two above views in sql2005 only.
Can you give me some thing for sql2000 please.
June 13, 2008 at 10:56 am
You can use dbcc inputbuffer (spid) for SQL 2000.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply