-
Status Querys
I just started working with MS SQL. I'm attempting to find the equivalent of the MySQL commands STATUS and SHOW STATUS.
Essentially, I want to connect to the database from a .net app, check the status, such as how many connections, table locks, errors, etc... and display that information on my application.
Any recommendations?
-
Answer to my own question
After a little bit of digging and searching, I found some things that help me:
sp_who
sp_lock
and
select * from master.dbo.sysprocesses
If you know any other commands along these lines, let me know. Thanks
-
You can find more in sql books online.
-
links?
Any specific links in the books online? I've been searching them and coming up with very little helpful stuff. I must admit, I'm much more a fan of the MySQL documentation. It has a much better flow and ease of use to it.
-
It should be installed together with your SQL client. There is a copy in MSDN as well.
-
If this is 2005, you should be using the new system dynamic management views...can check msdn online as well as books online.
For e.g.
SELECT s1.cpu_time,s1.sql_handle,s2.text, * FROM master.sys.dm_exec_requests s1 outer APPLY sys.dm_exec_sql_text(sql_handle) AS s2
order by s1.cpu_time desc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|