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,526 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)
259 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)
222 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)
622 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)
417 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)
814 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,009 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,844 reads
In MS SQL, January 1 of any year defines the starting number for the week. The DATEPART(wk, 'Jan 1, xxxx') always return 1. However, a lot of reports Week No is actually based on ISO 8601 standard, that is January 1 of any year can be Week 53/52 or Week 1. (http://www.merlyn.demon.co.uk/weekinfo.htm#IDC)The Rule is as […]
2005-06-14 (first published: 2005-05-27)
297 reads