SQL DBAdmin toolbox - Part 2: Verify all databases in the enterprise
Do you verify database backups regularly? If not, you may find this toolbox solution usable.
2011-06-21 (first published: 2011-06-15)
1,996 reads
Do you verify database backups regularly? If not, you may find this toolbox solution usable.
2011-06-21 (first published: 2011-06-15)
1,996 reads
This script helps to find all columns of an index on a table. Include columns covered (include)
2011-06-17 (first published: 2011-05-31)
1,373 reads
Three different ways that you can get the count of the rows in a table.
2011-06-16 (first published: 2007-08-16)
6,552 reads
To merge data in SQL 2005 from various table, we do not have a MERGE function as in SQL 2008. The following script gives an alternative approach of implementing in SQL 2005
2011-06-15 (first published: 2011-06-03)
1,426 reads
2011-06-14 (first published: 2007-12-05)
5,956 reads
2011-06-13 (first published: 2008-04-19)
5,835 reads
A stored procedure for restoring a database up to the latest log backup from a file folder. Compatible with the backups made by standard SQL maintenance plan.
2011-06-10 (first published: 2011-05-27)
1,562 reads
When creating a backup that will be restored to a development database, you may need to mask PII information. This script will help you with that.
2011-06-09 (first published: 2011-05-25)
1,447 reads
Generacion de numero de registros y espacio usado en disco todas las tablas de la base de datos
2011-06-08 (first published: 2008-06-24)
528 reads
Easily remove duplicate records without temp tables by using a CTE.
2011-06-07 (first published: 2008-03-19)
6,927 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...
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:...
Comments posted to this topic are about the item Cleaning Up the Cloud
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