Scripts

Technical Article

Server-Level Row Counts for Tables and Views

This script creates a table that will store the row counts of non-system tables and views across all user-created databases (database ID > 4) on the server, as well as a stored procedure that refreshes the row counts by recalculating them. The script uses the database ServerInfo to store the table and stored procedure. Replace […]

You rated this post out of 5. Change rating

2026-09-04

9 reads

Technical Article

Demo Tracking Dropped Objects

This script demonstrates step by step how to implement a dropped objects tracking flow. Important limitation to consider: The stored state of a dropped object is based on the most recent available snapshot and not necessarily on the state of the object immediately before it was dropped. The accuracy of the stored information depends on […]

You rated this post out of 5. Change rating

2026-08-31

19 reads

Technical Article

Randomly Selecting Columns and Rows from a Table or View

The following script creates a procedure that returns a specified number of random columns and rows from a specified table or view. The number of columns and rows is determined by the @NumberOfColumns and @Rows parameters. The @RandomColumnOrder parameter specifies whether the selected columns are returned in random order or sorted by their ordinal position […]

You rated this post out of 5. Change rating

2026-08-31

22 reads

Technical Article

Column Data Types

This scripts creates a view containing data type information for columns in user-defined tables and views. It provides an overview of the data types in use and can help identify opportunities for data type optimization and standardization. The data types are formatted as they appear in Object Explorer in SSMS. For example, sysname is displayed […]

You rated this post out of 5. Change rating

2026-08-25

41 reads

Blogs

Measuring RAG Solutions: Are We Retrieving the Right Information?

By

A RAG pipeline that answers questions in the demo is not the same thing...

Advice I Like: Lots of Ideas

By

“A multitude of bad ideas is necessary for one good idea” – from Excellent...

Building a DBA Agent for Your SQL Server Estate with MCP

By

Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...

Read the latest Blogs

Forums

Practical SQL Server Development Tips for Better Database Projects

By academicexpertt

Working with SQL Server 2022 can be a great learning experience, but development tasks...

Looking for New Blood

By Grant Fritchey

Comments posted to this topic are about the item Looking for New Blood

Server-Level Row Counts for Tables and Views

By Artur Sanin

Comments posted to this topic are about the item Server-Level Row Counts for Tables...

Visit the forum

Question of the Day

Hyperscale Replicas I

What types of secondary replicas are available for the Azure SQL Database Hyperscale edition?

See possible answers