Scripts

Technical Article

Date String format with optional Timestamp

I find it so annoying to format dates. Sometimes I want to include the timestamp, but if it is a midnight time stamp, the time is irrelevant. Sending in a datetime will return either the date string or a date string with a timestamp up to the seconds with either AM or PM.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2007-01-02 (first published: )

219 reads

Technical Article

Check and Set Default file Locations with TSQL

Checks the default file locations for your data and log files. If not set, it sets them to the specified values. This is written for a SQL 2005 default instance. Registry paths may be different for SQL 2000 or named instances.The script can be easily modified to update it if the current value is set […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2007-01-01 (first published: )

910 reads

Technical Article

Execution of Code on Multiple Servers Remotely

Do you have more than 10 sql servers you must manage? Most DBA s do, I have over 120 sql instances to manage. Before I used to use ISQL/OSQL in a batch to execute a command on all these instances. It works but not very nice. Below is the code I use to collect information […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-12-28 (first published: )

818 reads

Technical Article

Find Missing Constraints

Procedure to help find missing constraints when comparing two databases that are supposed to be the same.  SP has ability to show all constraints per database, and the ability to generate create scripts to make adding the missing constraints easier.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-12-26 (first published: )

809 reads

Technical Article

Checking the REMOTE site of a database-link

When gathering SQL server statistics on ALL our Active SQL servers the script was failing sometime when one of our servers was not reachable for one reason or another.This script is checking if the LINKED SERVER is up and running before executing the "gathering statistics" script for this particular server.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-12-25 (first published: )

209 reads

Technical Article

Update statistics for all tables in any DB

Most of the time even after executing dbcc dbreindex script on database you won't see much improvement in application/DB performance.  Thats because dbreindex creates statistics for all tables but it executes sp_updatestats which is like sample statistics. To get the maximum performance we had to execute Update statistics with fullscan on table. This simple will […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(8)

You rated this post out of 5. Change rating

2006-12-22 (first published: )

21,357 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