SQL Agent alerts should route serious severity events and errors 823, 824, and 825 through tested operators and Database Mail.
Sending Query Results by Email
Sending query results by email with Database Mail requires clear formatting, tested delivery, safe attachments, and size limits.
Searching Every Stored Procedure for a Word
Searching every stored procedure through sys.sql_modules finds text quickly, but comments, case, dynamic SQL, and other databases need care.
SQL SERVER – 2005 Constraint on VARCHAR(MAX) Field To Limit It Certain Length
SQL Server 2005 has no VARCHAR(12500), so how do you cap a VARCHAR(MAX) field at 12500 characters? A constraint on the column does the job.
SQL SERVER – Retrieve Information of SQL Server Agent Jobs
sp_help_job returns information about SQL Server Agent jobs in msdb. Run it with no parameters to list every job, plus a few related Agent posts.
SQL SERVER – 2005 Change Database Compatible Level – Backward Compatibility – Part 2 – Management Studio
How to change database compatible level in SQL Server Management Studio: right click the database, open Properties, then Options, and pick the level you need.
SQL SERVER – Primary Key Must Not Contain NULL – Primary Key are NOT NULL
Can you have a nullable primary key? No. A primary key must not contain NULL: Allow Nulls cannot be set on its columns, and all values must be unique.






