alkampfer on February 7th, 2012

If you issue a DBCC CHECKDB on a big database to verify for consistency errors, it will take a long time to complete, but the Management Studio windows usually does not give you any hint about how long does it take, or a percentage progress. Luckily enough sql server has a Dynamic Management View that [...]

kick it on DotNetKicks.com

Continue reading about Check progress of DBCC CHECKDB

alkampfer on January 31st, 2012

I’ve a stored procedure with a query that runs on a quite big database, it was slow (more than one minute to run) and was optimized using a temp table. The result is that execution time dropped to ~2 secs, and since this was acceptable the optimization stopped. After a couple of months, the query [...]

kick it on DotNetKicks.com

Continue reading about When it is time to tweak SQL Server queries

alkampfer on January 31st, 2012

In a production Sql Server database we had some issue with the hardware, the result is that one very big database started to gave us errors on DBCC CHECKDB, the error is the following one. Msg 8929, Level 16, State 1, Line 1 Object ID xxxxxx, index ID 1, partition ID xxxxxx, alloc unit ID [...]

kick it on DotNetKicks.com

Continue reading about Hardcore fix error in Sql Server database

alkampfer on December 28th, 2011

Suppose you have a big table with about 3 GB of data in and you need to add a nullable new column on it, you can open SSMS, open the table in designer and create a new column of type Int called sclo_durationInMinutes, press save and the table gets update quite immediately. Then you realize [...]

kick it on DotNetKicks.com

Continue reading about Why Management Studio forces you to know SQL

alkampfer on November 28th, 2011

I love Database Project, introduced with Visual Studio 2008, and with SQL server 2012 they will be replaced by the Data Tools (codename Juneau), so I have a couple of links to share about this argument. In this link you can find a table that compares all the features. As you can see, actually, one [...]

kick it on DotNetKicks.com

Continue reading about Some interesting links for SQL Server 2012 data tools