Technical Article

Scan stored procedures in all databases

I wrote this for the developers because they were always asking me to find all of their stored procedures that did X.It scans through the syscomments text in each database looking for the requested string.  User must have read access on the syscomments and sysobjects tables in each database.

You rated this post out of 5. Change rating

2002-06-14

906 reads

Technical Article

System Lock Snapshot

This script captures the current system lock in a temp table, then builds a temp translation table for database and object id by iterating through all of the databases.  It then produces a report by joining the two tables.For better performance, you could make the translation table perminante and only update it when you are […]

You rated this post out of 5. Change rating

2002-06-14

575 reads

Blogs

Using SQLFluff

By

I thought I didn’t care about linting, and lately, I haven’t written a lot...

Marketing Analyst: The Data-Driven Superhero Your Company Needs

By

Want to blend your love of marketing with the power of data? Becoming a...

Can You See Table Valued Parameters in Extended Events?

By

I live for questions and this was an interesting one. Can you see Table...

Read the latest Blogs

Forums

Dynamic T-SQL Script Parameterization Using Python

By omu

Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...

Eliminate a function by writing out the code is now throwing an error

By stevec883

/* I'm trying to eliminate (write out) this function 'largest_date', but SQL Server 2016...

SQL Server Migration - Redirecting Old Instance Connections to New AG Listener

By Wecks

Hi everyone, I’ve been tasked with migrating a Standalone SQL Server instance to a...

Visit the forum

Question of the Day

A Strange Choice

What is returned when I run this code in SQL Server 2022?

CREATE TABLE CatIndex
( indexval VARCHAR(20)
)
GO
INSERT dbo.CatIndex (indexval) VALUES ('1'), ('2'), ('3')
GO
SELECT CHOOSE(indexval, cast('2025-01-01' AS DATE), CAST('2025-02-01' AS DATE), CAST('2025-03-01' AS DATE))
FROM dbo.CatIndex AS ci

See possible answers