Scripts

Technical Article

Generate all database foreign keys

This script will create another script that has all foreign key DDL that exists in a given database.   You only have to run this, and then select the results of this script and paste it into another query window, or if for some reason you have lost your DDL this will enable you to retrieve […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2003-11-12

270 reads

Technical Article

Convert Numeric Figures into Words

Hi guys    What about a function that converts a number figure into words.This sample script is to demonstrate the procedural capabilities of SQL Server . Samples  select fig2words(10) will give --Ten-- ,select fig2words(103) will give --one hundred and three --    The author uses much under utilized capability of SQL Server the recursive function calls to […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2003-11-11

575 reads

Technical Article

Strip Non-numeric characters from string function

Sometimes it's necessary to strip non-numeric characters from the string, so you can convert to integer without error. Often it happens when you want to use stored procedure, especially system procedures. The output there can be already with some characters (MB, KB and such), but you want this result to be used for your own […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2003-11-10

1,337 reads

Technical Article

Database File(s) Growth Notification

This stored proc notify the user(s) if the data/log file grew. When you execute it for the first time it will get the data/log files sizes and inserts in a table. Next time when you run the script if will compare the current size with the previous files size. This script must need sqlmail configured […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2003-11-07

1,524 reads

Technical Article

ClearData

We can use this sp to clear data in tables.  I mainly created this sp for two reason. 1.This is useful to commence the testing from scratch.  2.Whenever we ask the database backup from our customer.  They hesitant to give the production database because of confidential.  I have used Delete and Truncate statement to clear […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2003-11-06

193 reads

Technical Article

Execute VBScript commands or .vbs files via T-SQL.

sp_ExecVBScript allows you to execute either a .vbs file or an ad-hoc VBScript command within a T-SQL batch.  Note that the command (whether it be ad-hoc or contained in the .vbs file) cannot have any code that requires user input (such as Input Boxes or Message Boxes).

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2003-11-05

7,723 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

DanDan Kavling Polri | WA:083121526888

By Layanan Bank BCA

Kavling Polri, Jl No.1601 Blok F 8, RT.8/RW.02, Jelambar, Grogol petamburan, West Jakarta City,...

Toko Kosmetik Sumber Ayu | WA:083121526888

By Layanan Bank BCA

Pasar Tomang Barat (Pasar Kopro) Lt Dasar Blok B-48, RT.14/RW.5 (depan parkiran motor), Tanjung...

SQL Server 2025 section missing?

By deubel_m

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

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