  |
|
SQL Server 2005 Scripts to add
audit triggers to all tables. Saves the changed column information as XML and
uses environment variables to make the scripts nice and generic. |
 |
|
Script to create currently missing
indexes on SQL Server 2005 - uses dynamic management views. |
 |
|
Example NANT build script for
database builds. |
 |
|
Script to add indexes to all FKs
(SQL 2005) |
 |
|
This
is a script that I've created because I was so impressed with Visio's
database diagrams. In Visio if you reverse engineer a database diagram, you
can see all the indexes represented in the diagram - really useful if you're
doing an initial index review. Anyway, the script will return a list of table
columns and associated indexes. |
 |
|
SQL 2005 script to show running
commands and connection info - like sp_who3 but using the dynamic management views |
 |
|
Scripts to manipulate files |
 |
|
Scripts to output XML (FOR XML) to
a file (3 methods: VB, VBScript and sp_makewebtask) |
 |
|
Script to remove CRLFs from text
files |
 |
|
Find all the occurrences of a
columnname in the database |
 |
|
Script to import the SQL Error
Logs, format the results and then allow querying using TSQL. |
  |
|
Scripts to delete backup files in a
round-robin fashion - like in the maintenance plan. Useful if you want to
avoid maintenance plans, but don't want too many backups to accumulate. |
 |
|
Simple script to ensure automatic startup of sql agent
when sql server service is started.
|
 |
|
sp_who3. Everyone has their own version :). -
script similar to sp_who2 but also shows command executed
|
 |
|
Script used to kill an agent's job, but only if it is
running
|
 |
|
Script to monitor table sizes over time
|
 |
|
Script to remove HTML tags from a string
|
 |
|
List of databases in 'incorrect' recovery mode
|
 |
|
Script showing simple use of FOR XML EXPLICIT
against Northwind (because I can never remember the syntax -))
|
|
|
These 5 batch files are used to create a dedicated
file structure for rollouts, and to automatically process .SQL files in
alphabetical order, logging all the output and metadata to a logfile.
|