October, 2009
Simple String Encryption and Decryption
In SQL Server 2008 and SQL Server 2005, one of the easiest ways to encrypt and decrypt strings is to use T-SQL's ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE functions.
SQL Server Magazine
|
December, 2008
Change Many Server Configuration Options in One Fell Swoop
You can change many configuration options in SQL Server 2005 and SQL Server 2000 simultaneously by using a.config file and a T-SQL stored procedure that automates the use of the sp_configure system stored procedure.
SQL Server Magazine
|
September, 2008
Find Weak Database Passwords
Use this password-cracking tool to check the complexity of the passwords being used for SQL Server database logins.
SQL Server Magazine
|
July, 2008
Use a Stored Procedure to Move User Tables Between File Groups
Here's a T-SQL stored procedure that finds and moves the clustered-indexes user tables you specify from old file groups to new file groups.
SQL Server Magazine
|
November, 2007
T-SQL Stored Procedure Creates Trace Tables from Trace Files
LoadTraceFileToTable loads the data from a trace file into a trace table so that you can easily sort and analyze that data.
SQL Server Magazine
|
October, 2007
T-SQL UDF Quickly Determines How Often a Substring Appears
To determine the number of occurrences of a substring within a string, a user-defined function (UDF) performs a simple arithmetic calculation.
SQL Server Magazine
|
May, 2007
Protect Your T-SQL Objects from Deletion
The sp_markAllMasterDBasSystem stored procedure can help protect the T-SQL objects you've created by marking them as system objects.
SQL Server Magazine
|
March, 2007
Procedure Helps Pinpoint Problematic Processes
Here's a stored procedure that displays all the T-SQL statements currently being executed along with the IDs of the processes running those statements.
SQL Server Magazine
|
February, 2007
Easily Find Rows That Violate Constraints
The showViolatingRows procedure automates the tedious task of finding rows that violate check and foreign-key constraints.
SQL Server Magazine
|
October, 2006
Summarize All the Constraints for a Table
The sp_showConstraints stored procedure is an alternative to using sp_helpconstraint when you need to find all the constraints for a table.
SQL Server Magazine
|
April, 2006
Optimize the Size of Your Indexed Integer Columns
Together, the suggestIntType and scanIntIndex procedures search for indexed integer columns in a database and determine whether the optimal data type is used for those columns.
Windows IT Pro
|
March, 2006
Rename Files or Directories On the Fly in T-SQL Scripts
SQL Server Magazine
|
February, 2006
Stored Procedures Work in Concert to Import and Export Data
Here’s a simple yet generic solution for exporting or importing data. This solution consists of two stored procedures: BCPObject and ExpOrImpDB.
Windows IT Pro
|
January, 2006
Quickly Retrieve a List of Available Media Resources
The sp_GetAllSQLMediaTypes stored procedure lists the names of all the available media and their types on a SQL Server machine.
SQL Server Magazine
|
January, 2006
Extend the sp_spaceUsed Procedure’s Usefulness in Obtaining Transaction Log Statistics
By compiling sp_LogSpace in a master database and calling it from an updated version of sp_SpaceUsed, you can extend the ability of sp_SpaceUsed to obtain transaction log statistics.
SQL Server Magazine
|
December, 2005
Don’t Let Resource-Intensive Sessions Consume All Your Resources and Time
The getMaxResourceConsumeSessions stored procedure lets you quickly identify the sessions that are consuming most of a SQL Server machine's resources.
Windows IT Pro
|
October, 2005
Dynamically Obtain a SQL Server’s IP Address in T-SQL Code
The getSQL_IPaddr.sql procedure uses the Ipconfig utility to dynamically find the IP address of a server running Microsoft SQL Server.
SQL Server Magazine
|