Scripts

Technical Article

tighter approach to counting strings in strings

Saw Mike's routine for counting occurences of a string in a string and I thought I'd offer a simpler solution.Simply replace the occurence with null and use length differences as shown.NOTE: len may ignore trailing spaces, so this can be made more solid by adding some non printable char (less likely to interfere with operation) […]

You rated this post out of 5. Change rating

2004-03-10

90 reads

Technical Article

Count number of strings within a string

This function will return the number of occurrences of one string within another string. I was looking for something like this recently, and the only thing I could find was needlessly complicated. Don't forget, when calling a scalar function, you must qualify with username like this:Select dbo.StringCount('Hi There','e') This function may be a little too […]

You rated this post out of 5. Change rating

2004-03-09

349 reads

Technical Article

Kill all SPIDs with a certain user ID

This script is used to disconnect all connections by a particular individual to a server. I use it when I have to disconnect somebody and they have too many processes to do it by hand. Normally, you can just connect the offending process, but if there are multiple processes that are causing a problem , […]

You rated this post out of 5. Change rating

2004-03-08

2,868 reads

Technical Article

Retrieve Index Information For All Tables - V2

This is an update to sp_helpindex, it allows you to pass the table name and whether you want to retrieve clustered, nonclustered or primary key indexes for a table. Using the sp_msforeach table will allow you to do this for all tables in a database. Inserting the data into a table will allow you to […]

You rated this post out of 5. Change rating

2004-03-04

1,029 reads

Blogs

Reflections on the Life of a DBA

By

The DBA life is fraught with pain. Those battles that we endure are mostly...

Moving On-Prem PostgreSQL to the Cloud: Picking the Right Path for Big Tables

By

Every PostgreSQL migration eventually hits the same fork in the road. The database is...

A Spread of Vacation

By

I’m off on vacation today. Which is a little weird as I just got...

Read the latest Blogs

Forums

ALAMAT BCA KCP Jatimakmur Telp:08218154393

By Layanan.bca

WA:08218154393 Jl. Raya Jati Makmur, RT.001/RW.007, Jatimakmur, Kec. Pd. Gede, Kota Bks, DKI Jakarta...

ALAMAT KONTAK BCA KCP Cikarang Telp:08218154393

By layanan 24jam BCA

WA:08218154393 Ruko Cikarang Plaza, Jl. Yos Sudarso No.5 Blk B, RW.6, Cikarang, Kec. Cikarang...

ALAMAT BCA KCU CIKARANG Telp:08218154393

By CSO BCA

WA:08218154393 Madison Square, Business Park Lippo Cikarang, Jl. MH. Thamrin No.163, Cibatu, Cikarang Selatan,...

Visit the forum

Question of the Day

TempDB Facts I

Can I set Accelerated Database Recovery on tempdb?

See possible answers