Scripts

Technical Article

ps_SearchStoredProcedures

ps_SearchStoredProcedures provides a "find utility" to search for string in Stored Procedure(s) that you select without dumping to a SQL script file. This stored procedure returns a list of the stored procedures that the string was found in and list of line numbers where the text was found. Both parameters of the stored procedure allow […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-15

442 reads

Technical Article

Split Delimited String (Updated: Multi char delimeters)

This UDF will take a delimited string and split it into a table. It has an identity field that is provided solely for uniqueness on the rows, but that can be removed to improve the speed, and optimize it. Sample call :dbo.fnSplit(, )@Data - the string to split apart@Delimiter - the seperator string, if DEFAULT […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-15

1,155 reads

Technical Article

DBA_EverywhereRun

Runs a SQL statement against each database based on a LIKE pattern for the name of the database.Features:* IsLike and IsNotLike parameters let you specify both a matching pattern and an exclusion pattern for the database name.* Script_Only mode generates the script of what the stored proc executes.  Especially useful for DDL statements.* List_Only mode […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-14

410 reads

Technical Article

sp_ServerStatus

Have you ever wanted to check that a server exists before using it. Here is a solution that use SQLDMO from within TSQL to get the status of a SQL Server service. It also works for 2000 instances. I have named it sp_ServerStatus for it to be based in master.This returns the status integer and […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-14

640 reads

Technical Article

sp_xml_PrepareDocumentFromColumn

Do you want to use OPENXML with an xml document in a table, this procdure will do it for you.Pass in the SQL that will return the column of data, it will return the document handle which can then be used with OPENXML.ExampleDROP TABLE TabCREATE TABLE Tab (doc ntext)INSERT INTO Tab VALUES ('' + REPLICATE('' […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-14

554 reads

Technical Article

Function and SP to find if file/directory exists

This function and stored procedure can be used to easily identify if a file, directory or parent directory exist. It wraps the functionality of xp_fileExist but gives easy access to the directory and parent directory exist values.To use it the function pass in the file or path and either 'IsFile', 'IsDir' or 'HasParentDir' it will […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2002-11-13

3,904 reads

Technical Article

INSTR Function

INSTR searches string for substring. --> position is an integer indicating the character of string where SQL Server begins the search. -->If position is negative, SQL Server counts and searches backward from the end of string. occurrence is an integer indicating which occurrence of string SQL Server should search for. The value of occurrence must […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2002-11-12

1,384 reads

Technical Article

sp_kill

This stored proc has helped me a lot when I needed to restore db, reconfigure replication, and do other database jobs. SQL server KILL command can only act on a single spid. This sp compiles KILL commands in a cursor to kill a group of spids based on database name, login name, host machine name […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-11

6,234 reads

Technical Article

Converting Binary data to a Hex Character String

Occassionally you might want to convert a binary number into some printable string.   This would allow you display some meaning fully numbers hex characters, instead of just some unreadable garbage.  This script takes a binary field, of basically any length, and converts it, character by character, to a character string.  The character string will contain […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-07

491 reads

Blogs

Flyway Tips: Object History

By

It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...

Car Update September 2026

By

Software is hard. While I love our Lucid Gravity, I realize that they are...

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Read the latest Blogs

Forums

Alamat BCA KCP Kwitang Telp/Wa:08218200233

By R4nt4u

Hub Cs 08218200233 Jl. Kramat Kwitang No.29, RT.1/RW.4, Kwitang, Kec. Senen, Kota Jakarta Pusat,...

Looking for old SQL Server 1.x - 4.21 disks, manuals, boxes, etc.

By Mike Scalise

Hi everyone, I'm hoping some of the longtime SQL Server professionals here might be...

Checking the Error Log II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Checking the Error Log II

Visit the forum

Question of the Day

Checking the Error Log II

What is the reason I should change my old code that uses xp_readerrorlog?

See possible answers