Handy DB Scripts – Fix Orphaned SQL Logins

Another script that’s nice to have around is a fix orphaned login script. I use this in particular when restoring databases from one server to another, and you simply receive a login fails error. Today, SSRS was trying to use an orphaned login and got: · An error has occurred during report processing. (rsProcessingAborted) · … Continue reading Handy DB Scripts – Fix Orphaned SQL Logins

Handy DB Scripts – Last Database Restore Date

I need to start collecting scripts someday…I’ve been saying that forever, but haven’t started yet. Maybe it’s time now, and this script is a good one to keep around. This one is to find the last database restore date, and it looks something like: WITH LastRestore AS ( SELECT      [name] AS DatabaseName     ,[create_date] … Continue reading Handy DB Scripts – Last Database Restore Date