SQLInsider Scripts

Technical Article

Finding Procedures with a specified text

  • Script

This script will give the text of all the procedures with occurences of a specifc variable. Syscomments has a limitation of 4000 characters but this script overcomes that as it uses DMO. The output is generated in a text file. If you want the name of the procedure only. replace the line where it says […]

You rated this post out of 5. Change rating

2005-03-03 (first published: )

167 reads

Technical Article

UDF to return Years, Months & Days between 2 dates

  • Script

There are two UDF's included here.The first one will return the number of Years, Months and Days between a Start and End date.The second one will return either Years, Months or Days which makes it much easier to include in a select.If you know of or find a better/faster way to do this, then please […]

You rated this post out of 5. Change rating

2006-08-01 (first published: )

169 reads

Technical Article

ScriptToFindWhichTablesBelongToWhichFileGroups

  • Script

If we give SP_HELP , we'll know to which File Group the table belongs.If we give SP_HELPFILEGROUP , we'll know the logical and physical file names along with other information that belong to the given File Group. But have you ever tried that, given a file group, how to find all the tables that belong […]

You rated this post out of 5. Change rating

2004-05-10

135 reads

Technical Article

sp_toptables

  • Script

Are you managing big databases with a lot of tables like SAP as I'm?Do you use sp_spaceused, as I'm?Do you want to know your n biggest tables as I'm?Then don't search any longer.I'm using this script every day for may maintenance jobs.I generates, like sp_spaceused, out of sysindexes the n biggest tables without any cursor, […]

You rated this post out of 5. Change rating

2003-10-20

297 reads

Technical Article

Decimal2Text Measurement Function

  • Script

This function is based on a script by Tim Dietrich (tim@timdietrich.us) named format_height.sql. His function took what he called a decimal representation of a measurement and formatted it as feet and inches. In reality the input value was just a measurement formatted to look like a decimal number but it was not a true decimal […]

You rated this post out of 5. Change rating

2003-06-27

74 reads

Blogs

What happens when we drop a column on a SQL Server table? Where's my space?

By

This article was initially posted on SQLServerCentral @ 2024-04-26. Short answer: The column is marked...

Why the masters and what lies ahead

By

I recently graduated with a Master’s in Strategic Communication from the University of Delaware....

Copilot Reminded Me How To Find a File Handle

By

Recently I was trying to delete a folder and kept getting the “something is...

Read the latest Blogs

Forums

LinkedServer error

By Yousaf Khan

I getting the bellow error when runing query on linkedserver from another server after...

Filtered index prerequisites to be used

By Martass

Hello, After few videos and  showing how filtered indexes works, what are the prerequisites...

Enhancing Web Application Performance through Database Optimization: A Comprehensive Study

By nai3

Comments posted to this topic are about the item Enhancing Web Application Performance through...

Visit the forum

Question of the Day

Automated Azure SQL VM Patching

There is an Automated Patching service for VMs running SQL Server in the Azure Cloud. This uses the SQL Server IaaS Agent Extension to work with PowerShell. What types of patches are installed with this service? Note: All updates are marked with tags, such as Important, Critical, or something else

See possible answers