Category: SQL DBA Hand Book

  • SQL DBA Hand Book

    Performance Monitoring ====================================================================================================================== SQL Server Error Log ======================================================================================================================Database Maintenance ====================================================================================================================== Missing Indexes in a DB ===================================================================================================================== Transaction Space Utilization Info ===================================================================================================================== SQL Server Statistics ====================================================================================================================== DB Backup and Restore History ====================================================================================================================== AOAG Log Sync Analysis ====================================================================================================================== Important SQL Server Scripts URL ====================================================================================================================== PowerShell to read a big file ====================================================================================================================== All About Tempdb

  • Scan SQL Server Error Log

     Scan SQL Server Error Log  create table #t_789(Log_date datetime,Process_Info Nvarchar(1000),Txt Nvarchar(3500) ) insert into #t_789 exec sp_readerrorlog;  insert into #t_789 exec sp_readerrorlog 1;  insert into #t_789 exec sp_readerrorlog 2; insert into #t_789 exec sp_readerrorlog 3; select * from #t_789 where Txt like ‘%error %’; Scan Current Error Log  –create table #t_789(Log_date datetime,Process_Info Nvarchar(1000),Txt Nvarchar(3500) ) insert into #t_789 exec sp_readerrorlog; select Log_date,txt from #t_789 order by 1 desc ; truncate table #t_789