Have you tried using DTS to load a database and those pesky foreign keys mess you up? This is actually two scripts, one to generate the SQL needed to drop all the Foreign Keys in a database and another to Add the Foreign Keys back when you are done. I've thrown in Disabling and Enabling […]
2005-07-13 (first published: 2005-06-22)
3,034 reads
I use this script to shrink the log files for development databases. The intention is keep the log files as small as possible when the database is not in use. By scheduling this script I can control when it happens as oppose to using auto shrink.
2005-07-08 (first published: 2005-06-29)
2,523 reads
forums question came up where someone needed to search every varchar/char field in the database, and find any table/field that had a specific value (ie ip address, email, servername) we all agree that a monster scan like this is bad, but bad or not, sometimes you need to do it.it returns results that look something […]
2005-07-07 (first published: 2005-06-29)
252 reads
Import database from source server using full and transaction log backups as recorded in msdb. Use it to import one or more databases to your development environment, to test your backups regularly or to move databases to a new server. To move to a new server, take a transaction log backup and put all in […]
2005-07-04 (first published: 2005-07-01)
217 reads
Full and Differential Backup of Select Databases with Calculating Disk Space and Checking if a Database is in Use With Selections
2005-06-28 (first published: 2005-05-27)
621 reads
This Stored Procedure gives you live information of the workload on the reportserver and information about who uses wich report and how often a report is startedA report based on this SP with a short refresh time gives you a live monitoring tool.
2005-06-24 (first published: 2005-06-01)
413 reads
This script will drop all of the foreign keys on user tables in the database it is executed in. This is useful as a pre-load process.
2005-06-22 (first published: 2005-05-23)
811 reads
procedure will create xls spreassheet file based on the query passed and put it into the designated folder
2005-06-21 (first published: 2005-05-24)
1,005 reads
We’ve all seen reindex procedures that rebuild all indexes in a database or all indexes in a database which have less than a specified ScanDensity. This one goes a few steps further. First, the DBA can specify a ScanDensity_Threshold (a min value for ScanDensity), plus a Limit (qty or %). If you specify a ScanDensity_Threshold […]
2005-06-14 (first published: 2005-03-31)
1,838 reads