Compile in master. Set your QA output to text. When run from the db of interest it generates checksum select statements for each user table in the db composed of the PK columns and a checksum for all columns excluding text, ntext, image and sql-variant. There are no parameters. Modify for your own use. Save […]
2005-12-19 (first published: 2005-04-14)
178 reads
Returns information about the files in the specified directory and/or subdirectories (if requested) and the total bytes for those files. Directory names are excluded so that the total bytes can be computed using the compute clause but you can specify that they be included at the expense of no total bytes. This sp uses the […]
2005-11-25 (first published: 2002-10-09)
495 reads
SP_SQLSMTPMail is an OLE automation implementation of the CDOSYS dll for Windows 2000 which utilizes a network SMTP server rather than an Exchange server/Outlook client. The stored procedure functions similar to xp_sendmail including the ability to run a query and attach the results. No MAPI profile is required. It is also a working, detailed example […]
2005-10-12 (first published: 2002-10-08)
3,763 reads
Ever have trouble removing logins because of onwership issues and permission grants? This stored procedure checks for a login (sql or nt) on the local server and if found it then checks each database for ownership issues and granted permissions. The rules for action taken are listed in the header of the stored procedure. Works […]
2005-06-14 (first published: 2002-07-11)
966 reads
A function to convert varbinary to hex string. Have you every tried to deal with varbinary via T-SQL? Passwords and SIDs are of this datatype. In Query Analyzer this datatype displays as hex string but under the hood it is binary. Try concatenating a varbinary to a string in a print statement and you get […]
2005-06-09 (first published: 2005-03-30)
234 reads
Executes a file containing T-SQL code without using OSQL. The file can be up to 80,000 characters. Each line in the file should be no more than 256 characters. (Customize the code as needed.) The DOS Type command is used to retrieve the code. Embedded "go"s are removed so don't expect termination behavior. The only […]
2005-03-25 (first published: 2004-07-14)
528 reads
Returns SQL server logins as a runnable script. Not a cleanup script. (updated 7/14/2004 to handle longer passwords that occurred in a previous service pack.)
2004-08-17 (first published: 2002-10-09)
1,110 reads