Find tables unused since last SQL Server restart
This script will return tables that haven't had any user activity since the SQL Server Service was last restarted. SQL 2005+
2011-07-22 (first published: 2010-01-28)
5,615 reads
This script will return tables that haven't had any user activity since the SQL Server Service was last restarted. SQL 2005+
2011-07-22 (first published: 2010-01-28)
5,615 reads
This procedure provides you the progess of the database backup or restore. We can execute the procedure to find the remaining time for completion of the backup or restore.
2011-07-18 (first published: 2010-02-19)
2,390 reads
Consolidated script generator for multiple stored procedures (existing and/or newly created) in MS Sql Server 2000/2005/2008 at one go
2011-07-15 (first published: 2011-03-28)
2,080 reads
It creates the script for restoring your database with all the backups (full, differential and transaction log) needed.
2011-07-13 (first published: 2007-12-27)
5,038 reads
2011-07-12 (first published: 2011-07-01)
1,162 reads
2011-07-11 (first published: 2011-07-02)
2,134 reads
Give information in tables such as type size and description of each of the columns
2011-07-08 (first published: 2011-07-06)
1,494 reads
This script will email info about the longest running SPID in an HTML formatted table
2011-07-07 (first published: 2011-06-27)
2,214 reads
T-SQL Script for Time Dimension Table Data: Populates Data between two dates for Reporting Solutions.
2011-07-04 (first published: 2010-06-14)
3,845 reads
A short script to backup all filegroups, for those who utilise filegroups within a database.
2011-06-29 (first published: 2010-07-20)
1,388 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers