Scripts

Technical Article

SQLPing.vbs

Troubleshooting intermitten connectivity issues can be difficult. One approach is to repeatedly test connecting to SQL Server outside of an existing application in order to verify if a server-wide intermitten issue is occurring. This script is used to test remote connectivity to a SQL Server. The script loops in one minute intervals (adjust as needed). […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-09-04 (first published: )

1,455 reads

Technical Article

get rich schema details of all or some tables

to get information about tables+columns+primarykeys+foreignkeys+identity, i firstly used SQL server built-in INFORMATION_SCHEMA.xxx. however, my company have various DBAs and each of them owns objects. when using INFORMATION_SCHEMA.xxx, it retrieves data based on current login (version 2005 resolves this schema v.s. object owner problem already... yeah) , which bring me a great trouble. if you want […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2006-08-30 (first published: )

604 reads

Technical Article

Reset Identity Seeds

This Script is used to reset the Identity coloumn to whatever the value we required. We need to compile this procedure in the database where we required to ressed the Identity coloumns of every table. After compiling we need to execute this procedure with a parameter of integer value. Then it will reseed the Identity […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-29 (first published: )

231 reads

Technical Article

Use TSQL for Drawing

This is an algorithm from the september 1986 issue of Byte Magazine, in an article called Abstract Mathematical Art. It borrows from Tim Conways Game of Life to represent an algorithm by which a series of numerical values can attempt to replicate itself. It is deeply steeped in the philosophy of Caos Theory and Evolution, […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-08-28 (first published: )

372 reads

Technical Article

Alphanumeric and Special Character Validation

Inspired in the script submited by ramesh_kondaparthy , this is a set oriented solution for the same problem.Parameters: 1) @InputString varchar(25)Accepts the string, which we need to validate 2) @Type int = 0 validate the string for only alphanumeric charactersi.e Allows characters between [A-Z] ,[a-z] and [0-9] = 1 validate the string for alphanumeric and […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-22 (first published: )

4,119 reads

Technical Article

Change to readable date format

Trigger to insert date into table in the form of01/01/00 12:00:00instead of SQL standard date format2000-01-01 12:00:00.000This allows easily comparing to or updating based onOracle date formats or a readable format for the web.triggername - name of the triggerTABLENAME - name of the table that trigger is created onCOLUMNNAME - name of column in TABLENAME […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-21 (first published: )

507 reads

Technical Article

relatively simple mode, median, mean

Here's a sample script to help you get some generic mode, median, and mean statistics for something. In my example, I'm getting the number of days something takes to start and stop some task. The idea is that I'd have a fairly short list of jobs, and record would record the job id, and start/stop […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-17 (first published: )

1,132 reads

Technical Article

Function to return the SQL Build Number

This function returns the SQL Build Number as a nvarchar(20) string. i.e. '8.00.760' @@Version is great, but super long, and the formatting of the string has changed over the years. This helps me find out what build of SQL I'm working on in a quick and efficient manner. The script includes the drop statement as […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-08-09 (first published: )

1,119 reads

Blogs

Speeding Up Patching – Beyond Patch Delivery

By

I wear many hats in technology, and one of those is as a (cyber)security...

Monday Monitor Tips: Query Recommendations

By

We keep adding stuff to Redgate Monitor, and it’s easy to miss some of...

A Pursuit of Lifelong Learning

By

The following came across my YouTube feed today. It’s an interview with General James...

Read the latest Blogs

Forums

Layanan BCA KCP Lemabang Cs 0823-7497-7784

By Halo_BCA

Wa:082374977784 Jl. Laksamana Yos Sudarso No.128/4F, 3 Ilir, Kec. Ilir Tim. II, Kota Palembang,...

Alamat Telp BCA KCP Iskandar +62 838-4945-0961

By layanan 24jam BCA

Wa:083849450961 Jl. Letkol Iskandar No.51-52, 24 Ilir, Kec. Bukit Kecil, Kota Palembang, Sumatera Selatan...

What is the worst part about existing monitoring solutions?

By Evgenii Vaniukov

Hi. What is the most difficult aspect of using monitoring software like idera, redgate,...

Visit the forum

Question of the Day

SQL Server Vector Support I

What are vectors in SQL Server 2025, as related to the new AI features?

See possible answers