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,278 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,419 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,260 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,304 reads
I saw a script on here that outputs commands to the messages pane in Query Analyser. When run, these scripts output row counts for all your tables. This script does the same thing, but in one step.Tested on SQL Server 2000.
2007-09-25 (first published: 2007-05-24)
763 reads
This script was created for an Oracle to SQL 2005 migration. It creates a table, and then populates it with the record counts for each table in a given schema. (You will need to replace the xxxx text with your schema name for it to work). I prefer populating a table with this data, then […]
2007-09-24 (first published: 2007-05-24)
1,025 reads