Scripts

Technical Article

SP to enable, disable or list all Triggers in  DB

SQL 7.0 and 2000 modified version of Rodrigo Acosta (racosta) Argentina Script that enable,disable or list all the Triggers in the given database. If enable or disable are specified, finds all the triggers of all the tables and enable or disable them, After that, it list all the triggers with it´s current state. If List […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-03-19

186 reads

Technical Article

Function to encript password

If you need to save password for you application in tables, with this function you can save them encripted. And with another published function (check the page to find the script) you can desencript it. The function receives the password,  modifies every character and returns the encripted password.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2004-03-18

643 reads

Technical Article

Drop Indexes

This script drop all indexes from table, including Primary Key contraint. First it del nonclustered indexes, then clustered and at last - drops PK contraint. This scirpt is useful, when you need drop all indexes, like when doing ETL process.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2004-03-17

556 reads

Technical Article

Difference between dates with thousands separators

This function calculates the time difference between 2 datetimes and displays the results in the following format:H,HHH,HHH:MM:SSThe return is a 15 character field that is left padded with spaces so that the field becomes right justified.  This makes the colons line up for easy reading.  Commas are automatically added as thousands separators as needed by […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2004-03-14

466 reads

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

103 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

383 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,911 reads

Blogs

The Book of Redgate:A Prehistory

By

I’ve covered the values in a number of previous posts on the Book of...

Evidence-bound: what AgentDBA will and won’t link

By

When the evidence names the database, it says so. When it doesn’t, it stops....

Prep data for AI vs. Fabric Data Agent Instructions: What Goes Where?

By

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

Read the latest Blogs

Forums

SQL Server 2025 section missing?

By deubel_m

Hello, the title says it all. Is the SQL Server 2025 section missing?

A design question in a parent child relationship

By eichnerm

I am not sure which is the best way to proceed. I have parent...

Hyperscale Replicas III

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Hyperscale Replicas III

Visit the forum

Question of the Day

Hyperscale Replicas III

In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?

See possible answers