SQL DBA Important & Handy Commands

Spread the love

Space Management:

2)dbcc sqlperf(logspace)

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
4) fn_get_sql(sqlhandle)
5) DBCC SHOWCONTIG, dm_db_index_physical_stats
6) dbcc opentran

Spread the love
Author: OTi
Meet OTi, the brains behind the popular tech blog "OurTechIdeas.com." OTi is an accomplished author, tech enthusiast, and an expert in SQL Server. With over a decade of experience in the tech industry, he has become a trusted voice in the world of database management. OTi's passion for technology began at a young age, and he has been tinkering with computers ever since. He graduated with a degree in Computer Science and has since worked for some of the biggest tech companies in the world. His experience has given him a deep understanding of how technology works and how it can be used to improve our lives.

Leave a Reply

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