Where_Am_I_With_DB
Updated Where_Am_I script to add database. This way you can park it in your master db and call it anytime you need it for another project/db.
2004-12-07 (first published: 2004-10-29)
163 reads
Updated Where_Am_I script to add database. This way you can park it in your master db and call it anytime you need it for another project/db.
2004-12-07 (first published: 2004-10-29)
163 reads
Is quite a joke, but useful, I guess, and, of course, improvable. It need to use two random number generator (inclued) published some weeks ago here.Some fieldtype needs to be generating-improved (e.g. images) ... I wait suggestions and improvements
2004-12-06 (first published: 2004-10-28)
339 reads
This script will update statistics on all user databases. The script can be created as a job from SQL Server Agent.
2004-12-03 (first published: 2004-10-27)
654 reads
This script finds the first day of previous, current and next month as well as last day of previous, current and next month.The calculation is based on the ISO date format which makes it independant of the date format used on the SQL Server.The calculation is performed from a date - it can be altered […]
2004-12-02 (first published: 2004-10-21)
246 reads
The following functions returns the number of years, months and days between two dates. The first returns a table format, and the second returns 1 value at a time
2004-12-01 (first published: 2004-10-13)
194 reads
Drops all the foreign keys in a database. This is useful when rebuilding data warehouses.
2004-11-30 (first published: 2004-10-13)
1,509 reads
I have a table named employees with an identity column named id. Also,last_name is a column in the table named employees. I created the employeestable and inserted 9 rows in it. If I do a select * from employees, theoutput looks like this:id last_name1 a2 b3 c4 d5 e6 f7 g8 h9 iThen I deleted […]
2004-11-29 (first published: 2004-10-13)
145 reads
This script extends the "Find strings in text of stored procedures" Script by LiviuB and and now finds thestring and removes it. You may modify script to just comment out the text.This script removes the text (in this case 'set dateformat dmy') from all non-system stored procedures in a database.Modify the variable @searchstring to contain […]
2004-11-26 (first published: 2004-10-13)
290 reads
Easy and Fast way to check Backup details. One line query to check backup status for all the databases. No need to go to each database or schedule job. Even you can use this query in customized application to get all the details on a single screen.
2004-11-25 (first published: 2004-10-14)
735 reads
This script uses two undocumented stored procedures that retrieve all tables in the database in which it is run and lists the data and index sizes, the sum of these sizes, and the table's size percentage of the entire database. The results are presented in descending order of the sum of the data and index […]
2004-11-24 (first published: 2004-10-25)
2,400 reads
By Steve Jones
I had a customer ask about analyzing their Test Data Manager (TDM) usage to...
By Steve Jones
I had an idea for an animated view of a sales tool, and started...
Next Monday, February 9, 2026, my one-day live online training SQL Server Query Tuning...
Think there's a reason why this is still in preview, but have someone manage...
Comments posted to this topic are about the item SQL Server 2025 Query Performance...
This is a generic question. To the moderators, I wasn't sure where to place...
On SQL Server 2025, what happens when I run this code:
SELECT JSON_OBJECTAGG( 'City':'Denver') GOSee possible answers