Scripts

Technical Article

Execute SQL-DMO Database method on all databases

This script allows you to specify a method and a server (or multiple servers.) It will then execute the method on every database on the server. With very minor tweaking you could have it search for the servers, then call the server db script with each one, or add another nesting to call tables or […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-04-27 (first published: )

742 reads

Technical Article

usp_KillUsers2

This script expands on the usp_KillUsers script posted by Brian Knight, by adding the text of the process that is being killed and will even kill users who are accessing the database from with in a process of another database. Does not contain the NET SEND option though.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-04-22 (first published: )

324 reads

Technical Article

Synchronize the DB user SID with the Login SID

If you attach a DB on an SQL Server different from the SQL Server where the DB was initially created, you will usually come up with a situation where a login will be a DB user however, you cannot see this through the login properties screen. That happens because the name of the login exists […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-04-21 (first published: )

1,426 reads

Technical Article

Reindex Procedure with a Twist (or two)

We’ve all seen reindex procedures that rebuild all indexes in a database or all indexes in a database which have less than a specified ScanDensity. This one goes a few steps further. First, the DBA can specify a ScanDensity_Threshold (a min value for ScanDensity), plus a Limit (qty or %). If you specify a ScanDensity_Threshold […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2005-04-20 (first published: )

1,874 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 […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2005-04-19 (first published: )

999 reads

Technical Article

Update statistics in all database (sp_updatestats)

This script permit executes the sp_updatestats in all databases at same time.First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.Now you can execute this […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2005-04-14 (first published: )

4,180 reads

Technical Article

Find maximum values for all "int" columns

/******************************************************** "CheckAllInts" Find all columns in all user tables in a database defined as "int", and get the maximum value for the column. Uses a cursor and logs the results to a table. (One-time CREATE TABLE statement at top of script). Successive runs over an appropriate period of time would allow one to find how […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2005-04-11 (first published: )

358 reads

Blogs

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...

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Read the latest Blogs

Forums

BCA KCU CITY TOWER Telp/Wa:0821°7555°651

By layanan_Bca88

Hub Cs 08217555651 Jl. M.H. Thamrin No.81 Ground Floor, RT.1/RW.6, Dukuh Atas, Menteng, Kec....

BCA KCU WAHID HASYIM Telp/Wa:08218200203

By m4rt1n4

Hub Cs 08218200203 Jl. K.H. Wahid Hasyim No.183 A-B, RT.14/RW.6, Kb. Kacang, Kecamatan Tanah...

BCA KCU THAMRIN Telp/Wa:08218200233

By R4nt4u

Hub Cs 08218200233 Menara BCA, Grand Indonesia, Jl. M.H. Thamrin No.1, RT.1/RW.5, Menteng, Kec....

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers