Simple Recovery \ Truncate and Shrink
This script sets the recovery model for all databases to simple. It also truncates the log files before shrinking the databases.
2006-12-19 (first published: 2005-06-03)
324 reads
This script sets the recovery model for all databases to simple. It also truncates the log files before shrinking the databases.
2006-12-19 (first published: 2005-06-03)
324 reads
This is just an optimized version of Daniel Payne's two scripts, base64_encode and base64_decode, with changes to end-of-block handling and a bug fix or two. If the encoded string ends in =, the last character is truncated. If ending in ==, two characters are chopped off. That seems better than replacing NUL characters with spaces, […]
2006-12-18 (first published: 2005-06-04)
7,661 reads
Challenged by Hans Lindgren's stored procedures of the same name, I created this. Note that it produces strange results on non-hexadecimal strings, overflows at 0x80000000, and could have issues with byte-ordering on some architectures.How does it work? Well, the distance between one after '9' (':') and 'A' is 7 in ASCII. Also, if I subtract […]
2006-12-15 (first published: 2005-05-04)
212 reads
SQLStackEngine - simulate a character stack using a string. This script was developed specifically to support the operator stack in SQLCalcEngine(also on this site). However, the implementation is complete enough to stand on its own.There are several functions in the package that correspond to the common stack functions of Push, Pop, Peek, and so on.In […]
2006-12-12 (first published: 2004-06-22)
146 reads
Sometimes you want to modify an object (like a stored procedure, Function, trigger and view) and you can not remember the name of that object, but you remember some words of the comments that you placed in the body of that object. If this is your case, you can use the following procedures depending on […]
2006-11-30 (first published: 2006-01-10)
177 reads
2006-11-30
1,140 reads
Drops the specified column from the specified table as well as any constraints that depend on the column. By default the script will just find the corresponding column and constraints.Comes in handy for patching databases.
2006-11-29 (first published: 2006-05-17)
962 reads
2006-11-28 (first published: 2006-10-11)
557 reads
I created this script to simplify the process of restricting access to high risk extended stored procedures. It will find any user or role which has execute permissions on any of the stored procedures in the "#High_Risk_Stored_Procs" temp table and will generate the relevant revoke statements to remove those permissions.The current list of stored procedures […]
2006-11-27 (first published: 2006-11-07)
659 reads
Ever needed to drop all connections to a database? Here is an easy way to do it.
2006-11-24 (first published: 2006-11-08)
594 reads
Unused Indexes in SQL Server: Find them, vet them, and drop them safely Indexes are...
By Steve Jones
I hosted this month, late as it turns out, but we still had a...
By Brian Kelley
I'm speaking on Quantum Computing at the PASS Data Community Summit. It's scheduled for...
Comments posted to this topic are about the item Create an HTML Report on...
While doing some housekeeping activity on several old but large production databases, I come...
How important to SQL Server is the speed of the SSD and network latency?...
In SQL Server 2022, how many backup files can I have in a striped backup?
See possible answers