It might not be useful now, but if you ever wanted to downsize the amount of data that you keep in your datawarehouse, good luck. This will help you do that. This job is set to shrink it down to 120 days, but you can adjust it as you like. Runs again in 5 day […]
2007-10-16 (first published: 2007-07-26)
544 reads
SQL Scripter is an open-source console tool for generating SQL Server DDL. Written in C# using .NET 2.0, SQL Scripter provides front-ends for MSBuild, NAnt and the Windows command line. Each front end supports syntax for specifying which types of database objects to script, including all objects of a type or directly named instances.SQL Scripter […]
2007-10-12 (first published: 2007-07-31)
6,280 reads
When changing schema or modifying an application it is often necessary to determine when a column from a specific table is used. This procedure produces a formatted report (when outputting from query analyzer or management studio in text mode) that specifies all of the procedures, views, functions and triggers that use the designated table.column.
2007-10-10 (first published: 2007-07-19)
7,420 reads
This is something that I find very useful and saves me a lot of time.This procedure needs to be created on the Database that holds the table that you wish to Audit. This procedure when called will create an audit table based on your source table in a database of your choice. All update/delete and […]
2007-10-03 (first published: 2007-06-20)
9,261 reads
This script was written to solve a problem where we needed to dynamically create bch files for Veritas Backups direct to tape backups. We needed to parse the sysdatabases daily and create the bch files that veritas would use to backup each server and database. This SQL Script uses xp_cmdshell to call a windows shell […]
2007-10-02 (first published: 2007-06-18)
457 reads
Many times we are required to write lenghty insert statements for tables with many columns. This script will create an insert statement for u.It takes 2 parameters first tbale name and second the ordinal positions of the columns seperated by ','for example USP_GenerateInsert 'TabName' ,'1,2,3,4,5'Hope this is Helpful
2007-10-01 (first published: 2007-06-17)
1,748 reads
This simple script is useful if you have a lot of scripts owned by developers, and you want to re-assign them all in one go to SA or any other login. Note the section which produces a rollback if you have any problems after the re-assign
2007-09-27 (first published: 2007-06-01)
2,385 reads
Extracting words of a string with removal of unwanted punctuations.This is a flexible function to extract words from a string and tested on both SQL 2000 and 2005As you see the logic of this function is very simple. Maybe the update statement seems strange to beginners because it does not update any field of underlying […]
2007-09-26 (first published: 2007-05-26)
1,305 reads