Mapping network drives

Network drives are easy enough to map except when it comes to sql server and its many sides.  I would like to put some of my backups on a network share to save space on my local drives, and you would think it would be easy enough, but then I got a hiccup, and then another hiccup….and I hate hiccups. The first hiccup was that some of the servers were using the built-in account (NT SQLSERVERAGENT…etc). The built-in cannot access network share. The work around (which is not ideal) was to grant access to the network share and folder to … Continue reading Mapping network drives

Change SMTP server name

                   Simple Mail Transfer Protocol or SMTP is what allows you to receive email alerts from your Instance to either yourself, your alerting system or group of people. Now, in order for SMTP to work, it must be configured with a server. Some of our Instances were still using old deprecated SMTP servers so I needed to update all the SMTP servers to the current one. I used the following script to resolve the issue across my multiple servers. FYI this script was executed via my CMS (central management server). If you have CMS  in your environment then great, if you do … Continue reading Change SMTP server name

SQL Server Database Restore History

  While working with databases, one of the most repeated task are database restore and refresh from production to test or dev environment. I’ve had situations where after a refresh (restore databases), our client would assume the refresh was not done or the refresh was not completed. They were not seeing the data they were expecting. Now how can you prove that you did the refresh from the most recent backup successfully? The below script will give you all restore details like restore date, which backup was restored, what sources location, and etc. use Master SELECT [rs].[destination_database_name], [rs].[restore_date], [bs].[backup_start_date], [bs].[backup_finish_date], … Continue reading SQL Server Database Restore History