Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Ed Vassie,
This routine sets standardised database options. It is a common problem that database options differ from the site standard, especially in Development environments. Running this routine via a weekly SQL Agent job overcomes this problem.
To set standard options for all databases:
To set standard options for a given database:
EXEC spSetDBOptions @dbname='Your_Database'
To generate code but make no changes, use the @process parameter. To seet debugging information, use the @debug parameter:
EXEC spSetDBOptions @process='N',@debug='Y'
The setting of individual options can be suppressed by using the @setopts, @setowner, @setsize parameters.
This routine will produce an appropriate message if an errors occurs. Use the following statement to add the message to SQL Server:
EXEC sp_addmessage 700000, 16, N'%ls'
Dynamically build a comma delimited CSV file using the BCP utility from any table or view in your da...
I’ve had to debug database mail problems several times over the last year or so. Below is a collect...
passing null value to an oracle database from SSRS, incase a parameter is set optional
creating stored procedure with optional parameters