SQL DBA Important & Handy Commands

Space Management:

1)sp_spaceused
2)dbcc sqlperf(logspace)
3)xp_fixeddrives

Information Commands:

1) sp_helpdb
2) select db_id(‘DBName’)
3) select db_name(DBID)
4) select * from sys.dm_exec_sessions, dm_exec_connections
5) select * from sys.databases
6) select * from sys.database_files

Monitoring Commands:

1) sp_who2
2) select * from sys.dm_exec_requests where session_id>50
3) DBCC INPUTBUFFER(spid)
4) fn_get_sql(sqlhandle)
5) DBCC SHOWCONTIG, dm_db_index_physical_stats
6) dbcc opentran

Please like or share this post if you found it helpful, thank you.
Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Email this to someone
email
Print this page
Print

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *