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)
326 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)
326 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,689 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)
215 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)
149 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)
182 reads
2006-11-30
1,144 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)
966 reads
2006-11-28 (first published: 2006-10-11)
559 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)
666 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)
597 reads
By Steve Jones
This was Redgate in 2010, spread across the globe. First the EU/US Here’s Asia...
By John
Today is Christmas and while I do not expect anybody to actual be reading...
By Bert Wagner
Until recently, my family's 90,000+ photos have been hidden away in the depths of...
Comments posted to this topic are about the item Happy Holidays, Let's Do Nerdy...
Comments posted to this topic are about the item UNISTR Escape
Comments posted to this topic are about the item Celebrating Tomorrow
In SQL Server 2025, I run this command:
SELECT UNISTR('*3041*308A*304C\3068 and good night', '*') as "A Classic";
What is returned? (assume the database has an appropriate collation)
A:
B:
C:
See possible answers