SQL Server Scripts Tips
All Tips
Administration
Attach and Detach
Auditing
Backups
CTE
- Fix SQL Server CTE Maximum Recursion Exhausted Error
- How to use SQL Server CTEs to make your T-SQL code readable by humans
- Recursive Queries using Common Table Expressions (CTE) in SQL Server
- Recursive queries with SQL Server 2000
- SQL Server Common Table Expressions (CTE) usage and examples
- SQL Server CTE and XML Recursion Script
Cursors
- Iterate through SQL Server database objects without cursors
- Making a more reliable and flexible sp_MSforeachdb
- Run same command on all SQL Server databases without cursors
File System
- Accessing OLE and COM Objects from SQL Server using OLE Automation Stored Procedures
- File Validation in SQL Server with xp_fileexist stored procedure
- SQL Server Script to Create Windows Directories
Logins
Pivot
Processes
Reporting
Schema
Search
- Find text strings in character data types using SQL Server LIKE Operator
- Finding and listing all columns in a SQL Server database with default values
- List columns and attributes for every table in a SQL Server database
- Scan a SQL Server Database for Objects and Columns Containing a Given Text Value
- Search all string columns in all SQL Server databases
- Searching and finding a string value in all columns in a SQL Server table
- SQL Server Find and Replace Values in All Tables and All Text Columns
Security
Storage
Strings
- Splitting Delimited Strings Using XML in SQL Server
- Standardize SQL Server data with text lookup and replace function
Tables
Transaction Logs
Troubleshooting