Scripts

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

3 (2)

You rated this post out of 5. Change rating

2002-11-12

1,322 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

5,756 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

453 reads

Technical Article

Drop Statistics

This procedure was created to automate the dropping of statistics on a user specified table.  Very simple code, but handy if the need is there.Replace 'tablename' throughout script with the name of the table intended to temporarily house the statistics name(s).

You rated this post out of 5. Change rating

2002-11-01

1,051 reads

Technical Article

Execute DTS package using OA procedures

This script will execute a DTS package using the sp_OA stored procedures. It accepts six parameters which specify the server name, security mode flag, userid, password, package name and optional package password.Eg:For SQL SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=0, @vcrUID='UserID', @vcrPWD='Password', @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'For Windows SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=1, @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'It uses a function […]

You rated this post out of 5. Change rating

2002-10-31

349 reads

Technical Article

Find and Replace VBScript within DTS Package

This script will find and replace specified text within all ActiveXScript tasks with a certain text string in the description. It was designed on SQL 2000, but I think it will run on SQL 7 as it doesn't reference any SQL 2000 specific properties. It opens a package object and then loops through the steps […]

You rated this post out of 5. Change rating

2002-10-31

620 reads

Technical Article

Find Procedures and tables by column

The stored proc FindObjByColumn_sp, while simple, is extremely useful when making database changes or for any reason that you need to find any tables and stored procedures that contain a particular column.  It searches the system tables of a database to find the object containing the column.  In addition, the procedure automatically adds a wildcard […]

You rated this post out of 5. Change rating

2002-10-31

425 reads

Blogs

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Read the latest Blogs

Forums

Creating paginated report where each page is a month in the range selected

By plsh

With in the paginated report I am trying to display on each new page...

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Do You Want a Microsoft Solution?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Do You Want a Microsoft...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers