SQL Server keeps backup history in msdb forever. Use sp_delete_backuphistory to delete backup history older than 30 days, or any number you pick.
SQL SERVER – Refresh Database Using T-SQL
Can you refresh database in Object Explorer using a T-SQL query? No. But if cached objects changed, DBCC commands can clear the cache for you.
SQL SERVER – Introduction to CLR – Simple Example of CLR Stored Procedure
An introduction to CLR in SQL Server 2005 and later, with a simple CLR Stored Procedure built in Visual Studio that prints the current system datetime.
SQL SERVER – Renaming SP is Not Good Idea – Renaming Stored Procedure Does Not Update sys.procedures
Renaming Stored Procedure objects with sp_rename looks fine, but the stored definition keeps the old name, as sp_helptext shows. A quick demo on AdventureWorks.
SQL SERVER – Guidelines and Coding Standards Complete List Download
My coding standards complete list for SQL Server, cut to what people follow: naming, formatting, and the rules that prevent real bugs.
SQL SERVER – Guidelines and Coding Standards Part – 2
Part 2 of my Guidelines and Coding Standards: nest single quotes, add parentheses for readability, use IF EXISTS with SELECT 1, and avoid the SP_ prefix.
SQL SERVER – Guidelines and Coding Standards Part 1
Guidelines and Coding Standards Part 1: Pascal naming for tables, and naming patterns for stored procedures, triggers, indexes and keys.







