Scripts

Create Insert 

Posted by Philip Leitch Tuesday, November 10, 2009 2:40:42 AM Categories: Database Administration Procedure

Creates an easy "Insert" script for transfering data, dynamically constructed based on the table:

e.g. Insert into '[XYZ] Values('test', 2,2,'Value')

... read more
 

Remove Backup History 

Posted by Philip Leitch Monday, November 9, 2009 6:11:50 PM Categories: Database Administration

Remove Backup History which will reduce the size of MSDB and also increase the speed of backup and restore routines.

... read more
 

OverlapDates 

Posted by Philip Leitch Sunday, October 11, 2009 6:00:00 PM Categories: Date and Time Scalar Function

This function determines whether pairs of dates overlap or not.

... read more
 

Data_Size 

Posted by Philip Leitch Wednesday, October 7, 2009 9:40:03 PM Categories: Database Administration View

Provides a way of viewing the size of tables, and what part of the table contribute to that size.

... read more
 

Progress Bar 

Posted by Philip Leitch Sunday, August 30, 2009 11:41:33 PM Categories: Procedure

Creates a text based progress bar.

... read more
 

Prime Numbers 

Posted by Philip Leitch Friday, August 7, 2009 1:41:27 AM Categories: General Interest
Recently there was a competition on creating prime nubmers in SQL Server.  Although there were faster versions, I believe that this is the fastest version that will scale.   create table Primes (p integer NOT NULL Primary Key) go set ... read more
 

SP_Kill_Users 

Posted by Philip Leitch Saturday, June 13, 2009 6:22:49 AM Categories: Database Administration Procedure

Kills all processes currently using a specified database, or all databases if no database is supplied.

... read more
 

Time To Text 

Posted by Philip Leitch Thursday, June 11, 2009 7:30:03 PM Categories: Date and Time Scalar Function String
isplays just the time component of a datetime/smalldatetime value.
... read more
 

Tax Component 

Posted by Philip Leitch Sunday, June 7, 2009 7:59:48 AM Categories: Currency Scalar Function

Determines the tax component of an already taxed value.

... read more
 

OverlapDates 

Posted by Philip Leitch Sunday, June 7, 2009 5:46:18 AM Categories: Date and Time Scalar Function

Determines if one pair of dates overlaps with another pair of dates.

... read more
 
Page 2 of 3 << < 1 2 3 > >>
Copyright 2009 Philip Leitch