Script database mail configuration

Make sure we do profiles and accounts in the proper order. And add IF NOT EXISTS.

Id #25 | Release: None | Updated: May 4 at 6:59 PM by billgraziano | Created: May 4 at 6:59 PM by billgraziano

Switch the order of the audit and audit specs script in the output file

It needs to create the Audit and then the Audit Specification. Also add an issue to enable the audit after it's scripted.

Id #23 | Release: None | Updated: May 6 at 5:02 PM by billgraziano | Created: May 4 at 6:44 PM by billgraziano

Include the instance name at the top of each script

Include the instance name at the top of each script

Id #22 | Release: None | Updated: May 6 at 5:42 PM by billgraziano | Created: May 4 at 6:38 PM by billgraziano

Script a default database in an ALTER LOGIN statement

The create login has a default database. This fails if the database doesn't exist. Change the script so that this is done in a second ALTER LOGIN statement. That will allow this script to be rer...

Id #21 | Release: None | Updated: May 6 at 5:42 PM by billgraziano | Created: Apr 6 at 7:25 PM by billgraziano

Catch a server not found error

Catch and handle this error. Also consider reducing the timeout.

Id #20 | Release: None | Updated: Apr 6 at 7:16 PM by billgraziano | Created: Apr 6 at 7:16 PM by billgraziano

Sprocs and UDF formatting

When exporting Sprocs and UDFs, the T-SQL checks to see if it exists, and if not, executes dbo.sp_executesql with the Sproc/UDF as a string. It should be similar to the following: BEGIN TRANS...

Id #18 | Release: None | Updated: May 6 at 5:42 PM by billgraziano | Created: Mar 21 at 7:37 PM by chrisw_clubready

Script Service Broker Items

Script all to a single file.

Id #17 | Release: None | Updated: Mar 19 at 3:55 PM by billgraziano | Created: Mar 19 at 3:55 PM by billgraziano

Script Notification Events

Capture CREATE EVENT NOTIFICATION event_notification_name

Id #16 | Release: None | Updated: Mar 19 at 3:55 PM by billgraziano | Created: Mar 19 at 3:55 PM by billgraziano

Script out Credentials and SQL Server Agent Proxies

These two really should go together.

Id #14 | Release: None | Updated: Mar 28 at 12:11 AM by qcjamess | Created: Dec 28 2011 at 7:39 PM by billgraziano

Don't script job schedule GUIDs

Scripts for jobs contain "@schedule_uid=N'c8576cb9-a455-4894-9ad6-b1734d004d67'" row (example) which should be just omitted - job scheduling GUIDs are usually different between servers unless you r...

Id #13 | Release: None | Updated: Mar 13 at 5:40 AM by qcjamess | Created: Dec 28 2011 at 7:28 PM by billgraziano