2013-10-22 (first published: 2007-10-10)
30,296 reads
2013-10-22 (first published: 2007-10-10)
30,296 reads
I have used the following function to convert dates according to desired textual formats that were not immediately available in the standard styles on offer.
2013-10-18 (first published: 2013-10-01)
2,000 reads
This script selects clustered indexes containing only a uniqueidentifier column
2013-10-17 (first published: 2013-10-02)
1,215 reads
This script finds the size of all indexes in a database along with the table and the filegroup on which the index resides.
2013-10-15 (first published: 2013-09-23)
1,864 reads
Top 5 expensive Queries from a Write IO perspective
2013-10-03 (first published: 2013-09-09)
2,355 reads
Lists details for all indexes on one or more tables / schemas, including row count and size. The non-pivot version also gives data type and other details for the columns.
2013-10-02 (first published: 2008-08-01)
3,702 reads
The below written query helps us find the most expensive queries from a read IO perspective. The DMV that we have used in this script is sys.dm_exec_query_stats and the function that we have used is sys.dm_exec_sql_text.
2013-09-27 (first published: 2013-09-09)
2,614 reads
This script is a universal foreach stored procedure. You can loop through everything with the help of if.
2013-09-24 (first published: 2013-09-10)
1,806 reads
Displays the information of the date of the latest backup that was done back to @daysago. When value is -0 it gives you all the backup information. The script also gives information on databases that never have been backed up.
2013-09-20 (first published: 2013-08-30)
1,578 reads
Recently I was asked to find all the Primary keys that are not clustered Indexes in the database. I constructed the below script which will help us to locate the primary keys in the database which are not clustered index.
2013-09-18 (first published: 2013-09-04)
1,921 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...
Comments posted to this topic are about the item Lessons from the Postmark-MCP Backdoor
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:...
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