Generate Drop Script for all Objects of a Type
Generates a series of drop statements for all objects of the input type (e.g., 'U' for User Tables). Install in the master database.
2002-01-04
350 reads
Generates a series of drop statements for all objects of the input type (e.g., 'U' for User Tables). Install in the master database.
2002-01-04
350 reads
I'm posting this job script because it gets used by my scheduler script. It simply enumerates through each database on the server, and then executes a DBCC SHRINKDATABASE. The only wrinkle here is that I have it do a quick check to make sure that certain jobs are not already running.
2002-01-04
1,177 reads
I've included this job script, because it is used by the scheduler scripts that I've also posted. This job is a little more involved than most may need... It first checks to see if certain jobs are running. Is so, it waits for a while, and then checks again. After that it drops the existing […]
2002-01-04
1,137 reads
I created this script in an attempt to better automate many different jobs that run each morning, as part of a datawarehouse build. I use it to not only tell me what jobs are currently running (so that I can manage how many I would like to run at a time), but what happened to […]
2002-01-03
1,276 reads
Using the the MSDB backup tables, will generate the basic disk RESTORE commands for a database. It will include the Full, differential and all associated log recovery commands for you. Run the stored proc in Query Analyser then copy/alter the output to recover your DB. Great if using EE is not your cup of tea. […]
2002-01-03
383 reads
Basic summary of all successful backups to date in descending date and ascending DB name order.
2002-01-03
549 reads
Here is a port from the Oracle's TRANSLATE function to T-SQL. It gets three arguments: a string to be searched, a string with a set of characters to be found and replaced, and another set of characters as the replacements. Example: SELECT dbo.TRANSLATE('ABCDE', 'BD', 'CE') It will return 'ACCEE'.
2002-01-03
479 reads
For all tables in the current database, it will script the DBCC command to reset the identity seed to 1 for all columns using them. Very handy for data migration.
2002-01-01
844 reads
This script will allow you to create a stored procedure that will check a server for any jobs that have failed in a specified number of days. It has proven valuable to me, since I have servers with lots of jobs that run frequently; I got tired of checking the history of each job to […]
2002-01-01
4,426 reads
Problems with error 512 more than 1 result returned due to the operator outside of the query. Found this when tested with multiple blocks going on at once. It worked fine when there was only 1 block. Depending on the type of server there can be a "whole lot of blocking going on "Replaced with […]
2002-01-01
820 reads
By Steve Jones
It’s that time of the month, and I’m late. My apologies. I had a...
By Chris Yates
For decades, enterprises have approached data management with the same mindset as someone stuffing...
Truncate Table Pitfalls Truncating a table can be gloriously fast—and spectacularly dangerous when used carelessly....
Comments posted to this topic are about the item The Improvement Limit
Comments posted to this topic are about the item Migrate SSRS Reports to a...