Posts

Showing posts with the label DBA

SQL Server Performance Tuning for the Busy DBA

Image
SQL Server Performance Tuning for the Busy DBA: Bottlenecks and Resolutions with Pinal Dave See how to use native tools in SQL Server and scripts based on Dynamic Management Views to quickly identify and resolve SQL Server performance bottlenecks.    Event Details ...

Basic SQL DBA Commands

  --To check for Blocked Processes: Sp_who2      --To find all the log files and the percentage space used of those log files in an instance: dbcc sqlperf ( logspace )     --To list all the files and their details in a particular database: exec sp_helpfile   --To list all the databases and their details in a instance: exec sp_helpdb   --To shrink a database file without specifying target size(preferred for log files): dbcc shrinkfile ( fileid )   --To shrink a database file with specifying target size(preferred for datafiles): dbcc shrinkfile ( fileid , target_size )   --To find the details about locks currently held by the processes: exec sp_lock   --To find all the drive spaces through MS SQL: EXEC master .. xp_fixeddrives   --To put the database in single user mode at command prompt: sqlservr . exe – m   --To put the database in Minimal mode at command prompt: sqlservr . exe...