Sometimes I need to stop alle jobs on a SQL server for some reason, but SQL jobs need to be stoppend and I also want to make sure thas they not automatic start again, until I want them to start. Therefore I wrote a scipt to disable SQL jobs, log which jobs was disables and… Læs mere Stop/start SQL jobs due to maintenance
Allways on falls behind
When using Allways On with asyncron secondary server, the secondary server sometimes fall behind if lots of changes on primary server. But how far behind? I am using this command to get a picture of the status. The command is executed on primary server. select recovery_lsn,truncation_lsn,last_hardened_lsn,last_received_lsn,last_redone_lsn,last_redone_timefrom sys.dm_hadr_database_replica_states
I cannot schrink database log
Disk full on log file disk is a bad thing. Often it helps when schrinking then database log file. It is only a problem when database is in Full recovery model. A reason why schrinking isn’t possible could be that backup is missing. So I needed a script to tell me when last backup is… Læs mere I cannot schrink database log
Running sessions
Often when a server seems to work slow or if I want to see what my store procedure is doing now, I use the “Running sessions” script. It helps me to get a fast overview of what are the SQL Server doing right now. Also blocking sessions are showed and if I uncomment the two… Læs mere Running sessions