Tag: ASC

Duplicate Indexes, What a Waste

Today on the tuning minute on the SQL Data Partners Podcast, we discussed duplicate indexes, which lead me to think more about and and write this post. You know there are many different ways of doing things in SQL Server,

Tagged with: , , , , ,

Database Corruption Challenge #9 Complete

Database Corruption Challenge #9 has completed with 19 winning participants, you can take a look at the scoring page for exact details. The first to solve the challenge this week was Eduardo Rezende who provided the winning solution just 58 minutes

Tagged with: , , , , , , ,

Week 4 – Building the Corrupt Database

The following are the steps that I went through to create a more difficult Database Corruption Challenge for Week 4. Here is how I built the database, nothing fancy, however I did add an extra FILEGROUP called [UserObjects]. Notice, that

Tagged with: , , , , , , ,

Corruption Challenge 1 – An alternative solution

After posting the winning solution for Corruption Challenge 1 from Brent Ozar, I realized that he and I both solved the corruption by using the REPAIR_ALLOW_DATA_LOSS option on CheckDb. A very nasty move, however it did repair the corruption.  

Tagged with: , , , , ,

Corruption Challenge 1 – how I corrupted the database

Since the corruption challenge completed yesterday, I have had several request asking how I created the corrupt database. So here is the script that I used to create the Database Corruption Challenge 1. First the initial setup. Most of this

Tagged with: , , , , , , ,

DBCC CheckTable

Being day seven of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKTABLE. Description: DBCC CheckTable is used to check the structure of a table to verify the integrity of every data page associated with that

Tagged with: , , , , , ,

DBCC CheckIdent

Being day six of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKIDENT. Description: DBCC CHECKIDENT is used for check on the current value in the identity column for a table.  It also reports on the

Tagged with: , , , , , , , , , ,

Should I Use A Unique Identifier As A Primary Key?

Take the following sample code.    Four similar tables with an INT IDENTITY, BIGINT IDENTITY, and two with UNIQUEIDENTIFIERS, one using newid() and the other with newsequentialid(). Once the tables are created and we insert 100,000 rows into each, they

Tagged with: , , , , , ,