by Katherine Villyard | Feb 19, 2024 | sql
Mostly so I can link it to a post that’s getting traffic… Declare @DBname varchar(255), @SQL nvarchar(max), @today nvarchar(50), @servername nvarchar(50) set @today = convert(nvarchar,GETDATE(),12) set @servername =...
by Katherine Villyard | Dec 22, 2012 | scripting
I support developers. In our dev/QA environment, people add, delete, and change the recovery model of databases all the time without telling me. How do I keep track of which databases need to be backed up? I don’t. I back up everything. Master has information...
by Katherine Villyard | Oct 8, 2012 | scripting, sysadmin
You didn’t get this from me. You downloaded it off the internet. In fact, why don’t I turn that bunch of scripts into a series of jobs and give it to you as one big lump? (Download.) How to use: Load file into SQL Server Management Studio. Replace all...
by Katherine Villyard | Aug 31, 2012 | scripting
“Windows Internal Database,” is basically SQL Server with network access and the maintenance tools turned off. You might want to do maintenance on whatever’s in there, anyway. I use Windows Task Scheduler for that, at least until I move the...
by Katherine Villyard | Aug 21, 2012 | scripting
Suppose that you’ve been asked to migrate 166 databases’ .mdf files from one drive to another. How would you do that? I’d generate a list based on the .mdf files (the databases are all named the same thing as the .mdf. If this wasn’t the...
by Katherine Villyard | Mar 6, 2012 | monitoring, scripting
I checked out Nagios Exchange, and didn’t see anything that checked the status of a job and used Windows/AD credentials/trusted connection. So I wrote this. It’s intended to run as an NRPE script, and doesn’t require anything that doesn’t come...