Following are couple of DBA must know commands. –Get the db details EXEC SP_HELPDB ‘Db_name’ –know the definition of the objects EXEC SP_HELPTEXT ‘object_name’ –Identify the size of database and table EXEC SP_SPACEUSED –Know the details of the disk drives EXEC MASTER..XP_FIXEDDRIVES —Quick view of SQL server sessions EXEC SP_WHO2 –It’s advanced version of sp_who2 but not shipped with SQL server.Get it from the following link. EXEC SP_WHOISACTIVE[…]
Read moreCategory: Uncategorized
SQL Server – Database Consistency Check DBCC CheckDB
Problem: How to check the consistency of a SQL Server database. Solution: DBCC checkdb WITH no_infomsgs, all_errormsgs; This Command can put overhead on the[…]
Read moreMSSQL Server : Automatically Restore DBs from backup files
Problem Statement:Many a times we need to restore multiple dbs from the backfiles on disk. We must write scripts to[…]
Read moreSQL Server:Write on “???” failed: 1453(Insufficient quota to complete the requested service.
Error:Write on “???” failed: 1453(Insufficient quota to complete the requested service. solution: Restrict the max server memory setting of the[…]
Read moreSQL Server Always On-Secondary database is NOT Synchronizing
Due to disk space crunch secondary database had gone into not synchronizing mode and it remained into that state even[…]
Read moreSQL Server -Defragment Indexes
Problem: Many a times you need to defragment indexes on SQL server. Following query is quite handy for doing this[…]
Read moreSQL Server -Find Blocking
Problem: Many a times DBA/Developer needs to identify the blocking in SQL server. Following queries will help you out. Solution:[…]
Read more