Clinton Herring


SQLServerCentral Article

Replacing Cursors and While Loops

Get some big performance gains by removing cursors from your code. New author Clinton Herring brings us a couple hints as he shows how two cursors were replaced in his code, resulting in 80 minutes of processing time dropping to 12!

4.43 (7)

You rated this post out of 5. Change rating

2007-10-02 (first published: )

49,877 reads

Technical Article

sp_gen_checksum_selects

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 […]

You rated this post out of 5. Change rating

2005-12-19 (first published: )

174 reads

Technical Article

sp_GetDirInfo

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 […]

You rated this post out of 5. Change rating

2005-11-25 (first published: )

493 reads

Technical Article

SQL 2K SMTP mail on Windows 2K

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 […]

5 (6)

You rated this post out of 5. Change rating

2005-10-12 (first published: )

3,758 reads

Technical Article

sp_RemoveLogin

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 […]

5 (1)

You rated this post out of 5. Change rating

2005-06-14 (first published: )

943 reads

Technical Article

ufn_vbintohexstr

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 […]

5 (2)

You rated this post out of 5. Change rating

2005-06-09 (first published: )

230 reads

Technical Article

usp_exec_tsql_strfile

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 […]

You rated this post out of 5. Change rating

2005-03-25 (first published: )

524 reads

Technical Article

Capture useful info about your SQL Server dbs

The server goes down and you are scrambling to remember settings, file names, locations, etc. about your databases on that server. This script captures that useful information before a serious problem occurs. I run it as an OSQL (ISQL) job and send the output file to my backup folder so the infomation goes to tape […]

4.5 (2)

You rated this post out of 5. Change rating

2003-08-07

661 reads

Blogs

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Going to Cloud? Look at the Shared Responsibility Model

By

The bottom line here is this: the idea that a CSP takes care of...

Read the latest Blogs

Forums

SQL server native CDC

By SQL_Surfer

Have anyone implemented CDC, and if so, what has been your experience with it?...

Import and Export wizard stuck on Guest user

By Sam-263310

I'm getting a error when using the Import and Export wizard to copy tables...

Aligning Compatibility Version Strategy

By BOR15K

I have joined a new project, where the business uses Azure SQL Hyperscale for...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers