usp_tableReference
Use this script to find the Stored Procedures which are referencing the table passed as argument from all databases on the server.
2013-08-12 (first published: 2013-08-02)
1,117 reads
Use this script to find the Stored Procedures which are referencing the table passed as argument from all databases on the server.
2013-08-12 (first published: 2013-08-02)
1,117 reads
Dynamically drop a user from each database on an SQL instance by their server login SID, then remove there server login as well. Plus some helpful printable information when ran.
2013-08-09 (first published: 2013-07-16)
874 reads
Easiest way to search for a string in any object within the database.
2013-08-08 (first published: 2013-07-29)
2,301 reads
A simple T-SQL script to display the number of days since the last database backup.
2013-08-07 (first published: 2013-07-29)
1,652 reads
Outputs an easily readable result of the database and server roles for database principals.
2013-08-05 (first published: 2013-06-14)
1,058 reads
2013-07-31 (first published: 2008-07-15)
1,601 reads
2013-07-30 (first published: 2013-06-12)
1,521 reads
Reports index length stats for indexes who's lengths exceeding parametrized thresholds (defaults to 0 - get all) for total length and seek length, optionally filtering schemas and tables.
2013-07-26 (first published: 2009-01-16)
2,311 reads
2013-07-25 (first published: 2002-03-19)
3,747 reads
Job list cluttered?
This script will return a list of jobs that either have not run in X months or where the next schedule run date is older than today.
2013-07-24 (first published: 2013-06-25)
1,262 reads
By Steve Jones
ecstatic shock – n. a surge of energy upon catching a glimpse from someone...
By Chris Yates
The New Arena of Leadership The role of the Chief Data Officer is no...
Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...
Comments posted to this topic are about the item Lessons from the Postmark-MCP Backdoor
Just saw the "Azure Extension for SQL Server" Does anyone has experience with it?...
I've noticed several instances of what looks like a recursive insert with the format:...
I have a table with this data:
TravelLogID CityID StartDate EndDate 1 1 2025-01-01 2025-01-06 2 2 2025-01-01 2025-01-06 3 3 2025-01-01 2025-01-06 4 4 2025-01-01 2025-01-06 5 5 2025-01-01 2025-01-06I run this code:
SELECT IDENT_CURRENT('TravelLog')I get the value 5 back. Now I do this:
SET IDENTITY_INSERT dbo.TravelLog ON INSERT dbo.TravelLog ( TravelLogID, CityID, StartDate, EndDate ) VALUES (25, 5, '2025-09-12', '2025-09-17') SET IDENTITY_INSERT dbo.TravelLog OFFI now run this code.
DBCC CHECKIDENT(TravelLog) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-10-14', '2025-10-17') GOWhat is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025? See possible answers