T-SQL Tuesday is a monthly blog party for the SQL Server community. It is the brainchild of Adam Machanic (b|t) and this month’s edition is hosted by Wayne Sheffield (b|t) who has asked us to write about “What Were You Thinking?” – things we have seen that left us scratching our collective noggins.
The list is long, so I’ll just go with something I saw yesterday. And in September. Both created by a full-time DBA at a client.
BACKUP LOG MyDatabase TO DISK = 'E:\SQLBackups\MyDatabase.trn' WITH INIT
Yep. It runs hourly. And initializes the .trn file each time. Goodbye Point in Time recovery.
Ick.
Bonus points: Duplicate indexes, which I will cover in a future post.
Thanks for reading!
Hahaha, reminds me of a job I saw once that would back up databases to file. The code to set up the date/time portion of the file name had a bug in it, so it was inserting empty strings – overwriting the same file with INIT every time. Doh…
Yep..this is basically that, without the pretense of knowing that datetime is a good thing 🙂
Twice recently, after at least 5-10 years of not seeing it.