This is a simple one but it doesn't stick until you write/read about it. Note, I use WAITFOR DELAY to pause/sleep the session between batches or T-SQL commands. For logic reasons, sometimes, I just gotta buy myself a few seconds for one thing to finish, before I start the next one. Ref: Control-of-Flow (lots of goodies… Continue reading SQL Server Error – Incorrect time syntax in time string used with WAITFOR.
So I was trying to figure out how to get the TLog backup job's name based on Back History because in this case, the job name happens to vary between SQL Server Instances. Sounds simple enough (well...not quite), then I realized for new SQL Server instances this job might not have even ever ran...so there went… Continue reading Select and Start a SQL Job without knowing the full job name or history