Procedure to help find missing constraints when comparing two databases that are supposed to be the same. SP has ability to show all constraints per database, and the ability to generate create scripts to make adding the missing constraints easier.
2006-12-26 (first published: 2002-03-12)
747 reads
Reports on all indexes on user tables within a databaseReports Tables with Missing Clustered indexReports Tables with Missing Primary KeysReports Possible Redundant Index keysReports Possible Reverse Index key
2006-12-21 (first published: 2004-09-16)
479 reads
In The Netherlands we use bankaccountnumbers that need to comply to a test call 'elfproef'. This test evaluates the sum of each number multiplied by the position the number appears in the accountnumber. If the modulos of the sum divided by 11 is zero then the accountnumber is valid. The length of a bankaccountnumber in […]
2006-11-20 (first published: 2004-12-14)
518 reads
In our environment, we needed to create and drop replication over and over in our test environment and I got realy tired of having to manualy go to each table with an identity column to set its ranges. This sproc will create or drop the publications and/or subscriptions for all or some of the objects […]
2006-11-15 (first published: 2001-09-05)
727 reads
This Script will create a copy of your DTS Package; append "_Renamed" to the end of the package name; and rename every task and step in the copied package to Task/Step_TaskType_DescriptionText_Sequence. The resulting package will lose all of it's text annotations, the layout will be the designer default rather than the original latout. It can […]
2006-10-12 (first published: 2005-01-05)
126 reads
There are two UDF's included here.The first one will return the number of Years, Months and Days between a Start and End date.The second one will return either Years, Months or Days which makes it much easier to include in a select.If you know of or find a better/faster way to do this, then please […]
2006-08-01 (first published: 2004-09-23)
169 reads
This function will calcuate the number hours between two dates excluding weekends. This allows for cycle time metrics and anything else requiring only the hours of weekdays.
2006-07-20 (first published: 2004-12-16)
362 reads
This script generate spool with create index for all foreign key.
2006-07-12 (first published: 2004-02-26)
373 reads
SP_WHO_3 is a very powerful utility for all DBAs. It displays processes connected to the system and what they are doing. It can find blocking processes, can return the Input Buffer for everything in the recordset returned, and provides immense filtering and sorting capabilities. It's designed to be extremely efficient, yet it provides many more […]
2006-01-17 (first published: 2004-08-12)
2,090 reads
2005-09-28 (first published: 2004-09-23)
270 reads