Technical Article

Finding a table name from a page ID

Imagine you come to work in the morning and notice that some new rows have been entered into the msdb.dbo.suspect_pages table during the night. Usually the first thing you’re going to do is run DBCC CHECKDB, but if your database is a few TB, that could be several hours before you know where the problem is, and which table may have lost data. You want to find out which table is involved as soon as possible so you can explore your disaster recovery options.

Blogs

Where Is My SQL Agent? Running Scheduled Jobs Against Azure SQL Database

By

One of the first things I review when I inherit a new SQL Server...

AgentDBA vs Critical SQL Server

By

It’s 07:43. Someone’s already left a message. “Something’s wrong with the DB server.” You...

Finally Cleaning Up Dropbox: Moving Almost a TB to Google Drive with rclone

By

I’ve had a Dropbox account for years. Like a lot of people, I started...

Read the latest Blogs

Forums

identity increments by 10,000 when it was supposed to be 1

By stan

hi a peer of mine who ive never known to be wrong says a...

Displaying Money

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Displaying Money

The Slow Growing Problems

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Slow Growing Problems

Visit the forum

Question of the Day

Detecting Characters

I have a SQL Server 2022 English default installation on a server. I want to detect if there are any upper case characters in rows and I have this code:

SELECT CustomerNameID,
       CustomerName
 FROM dbo.CustomerName
 WHERE CustomerName = LOWER(CustomerName)
Here is the sample data I am testing with:
CustomerNameID CustomerName
1              John Smith
2              Sarah Johnson
3              MICHAEL WILLIAMS
4              JENNIFER BROWN
5              david jones
6              emily davis
7              Robert Miller
8              LISA WILSON
9              christopher moore
10             Amanda Taylor
How many rows are returned?

See possible answers