Scripts

Technical Article

Concatenate Rows without a cursor

You might come accross a situation where you want to retrieve the values of all the rows concatenated and stored in one variable. Here is the solution. Lets say you have a table called tblCustomerOrders which has CustID and OrderID. You now want all the OrderIDs for a particular Customer to be stored in one […]

(1)

You rated this post out of 5. Change rating

2002-07-02

1,101 reads

Technical Article

GetFileInfo2

An Improved version of GetFileInfo that now includes the space utilization of each datafile.  Provides more detail per file.  Predict when your files are going to grow!! Both data and log files. This script organizes information about the database files on the server.   A cursor is used to get the information from each database.  The […]

You rated this post out of 5. Change rating

2002-06-28

575 reads

Technical Article

Function to return a delimited list as a table

This SQL2000 function accepts a delimited list of values as a string and the character you want to use as a delimiter.The function then splits these out and returns them as a table.The function assumes that the input string will contain unique integer values.Useage: -  SELECT Id FROM fnSplit('1,2,3,4' , ',')

You rated this post out of 5. Change rating

2002-06-27

590 reads

Technical Article

Get File Info

This script organizes information about the database files on the server.   A cursor is used to get the information from each database.  The information is reported in Megabytes, including the next allocation from disk.  No bells and whistles...and if I can find how dbcc showfilestats works I will add the amount of space used in […]

You rated this post out of 5. Change rating

2002-06-24

1,129 reads

Technical Article

Enumerate SQL Servers using SQLDMO and T-SQL

Microsoft reported BUG :ListAvailableServers Method of the SQLDMO.Application Object Causes Error 0x800A000E .When you execute the ListAvailableServers method of the SQLDMO.Application object from an ASP page, the following error message may occur: Microsoft SQL-DMO (0x800A000E) [SQL-DMO]Not enough storage is available to complete this operation. However, there is some solution to get SQL servers using Client […]

You rated this post out of 5. Change rating

2002-06-19

505 reads

Blogs

Red Flags in Your Query (T-SQL Tuesday #200)

By

When I'm looking at a query, I bet it's bad if I see... a...

T-SQL Tuesday #200: When I Look at a Query …

By

This month is a milestone for T-SQL Tuesday. It’s number 200, which doesn’t sound...

Reflections on the Life of a DBA

By

The DBA life is fraught with pain. Those battles that we endure are mostly...

Read the latest Blogs

Forums

A Quick Second Opinion

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Quick Second Opinion

Five Intelligent Query Processing Features in SQL Server 2022 That Quietly Tune Your Workload

By vgupta

Comments posted to this topic are about the item Five Intelligent Query Processing Features...

Checking the Error Log I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Checking the Error Log I

Visit the forum

Question of the Day

Checking the Error Log I

On my SQL Server 2025, I want to search the error log from my T-SQL code for potential issues and then inform an administrator. What is the current way to easily query the error log?

See possible answers