- SQL Server 2008
- SQL Server 2008 R2
- SQL Server 2012
- SQL Server 2014
If you feel confused about what version is affected, please read the blog post by Aaron Bertrand (an useful matrix here).
The KB is the #3065718, more details here.
Stay Tuned! 🙂
If you feel confused about what version is affected, please read the blog post by Aaron Bertrand (an useful matrix here).
The KB is the #3065718, more details here.
Stay Tuned! 🙂

Constraints are sometimes annoying in real life, but no society can exist without rules and regulations. The same concept is found in Database Design: no good data can exist without constraints.
Constraints define what is acceptable in the database and what does not comply with business rules. In Heaven, where the perfect database runs smoothly, no constraint is overlooked and all the data obeys to the rules of angels:
View original post 498 more words

Choosing the right data type for your columns is first of all a design decision that has tremendous impact on the correctness of the database schema. It is not just about performance or space usage: the data type is the first constraint on your data and it decides what can be persisted in your columns and what is not acceptable.
Choosing the wrong data type for your columns is a mistake that might make your life as a DBA look like hell.
Guided by angelic spells, the hands that design databases in Heaven always choose the right data type. Database architects always look at the logical schema and ask the right questions about each attribute and they always manage to understand what the attribute is used for and what it will be used for in the future.
Choosing the…
View original post 994 more words
Directly from the Microsoft Release Service blog, here is the list of latest updates for SQL Server 2014 RTM and SP1:
Cumulative Updates #8 for SQL Server 2014 RTM
Cumulative Updates #1 for SQL Server 2014 SP1
Additionally, you can download the new SQL Server Management Studio. As in the Microsoft Release Service blog, the SQL Server Engineering Team says: “we are delighted to announce our first “preview” release of SQL Server Management Studio! This is our first effort to release SQL Server Management Studio (SSMS) in a mechanism outside of the SQL Engine releases. Our goal is to update this frequently with new features, fixes and support for the newest SQL Server features in SQL Server Engine and Azure SQL Database”
Stay Tuned! 🙂

Object-Oriented programming taught us that generalizing is a good thing and, whenever possible, we should do it. Complex class hierarchies are a good way of reusing code, hitting the specialized classes only when a special implementation is needed.
In the database world, the concept doesn’t play exactly well.
In Heaven, there is a lookup table for each attribute, no matter how simple and no matter how small is the lookup table.
For instance, if your database is about sales, you probably have a Customers table and an Orders table, each with its own attributes resolved through a Foreign Key. The lookup tables are usually very small, with just a handful of rows in them:
Wouldn’t that be great if you could stop adding small, insignificant tables to your database schema? Wouldn’t it be a lot easier if you had…
View original post 867 more words
Considerations on normalization, one of the most popular topics speaking about RDBMS.

There’s a special place in the SQL Server Hell for those who design their schema without following the Best Practices. In this first episode of SQL Server Infernals, we will explore together the Row of the Poor Schema Designers, also known as “undernormalizers”.
In Heaven, where all Best Practices are followed and everything runs smoothly while angels sing, they design their databases following the rules of normalization. Once upon a time, there was a man who spent a considerable amount of his life working on defining the rules of the relational model. That man was Edgar Codd.
Mr. Codd laid down the rules of normalization, which are known as “normal forms”. The normal forms define the attributes of a well-designed database schema. While there are more normal forms, it is widely accepted that a schema is normalized when it follows the first three normal…
View original post 873 more words
Thanks to Gianluca Sartori (@spaghettidba)

Today I’m starting a new blog series called “SQL Server Infernals”.
Throughout this series, I will take your hand and walk you through the hell of SQL Server Worst Practices, as Virgil did with Dante in his Commedia.
You may ask why you should care about worst practices, when you have loads of great sources for Best Practices. The answer is that they are not enough.
On the other hand, Worst Practices can help you understand…
View original post 121 more words
Directly from the Microsoft Release Service blog, here is the list of latest updates for SQL Server 2012 SP1/SP2 and SQL Server 2014 + SQL Server 2016 CTP2:
Cumulative Updates #16 for SQL Server 2012 SP1
Cumulative Updates #6 for SQL Server 2012 SP2
and then….
Stay Tuned! 🙂
For all those who have been dealing with Visual Studio Online tags, you know, creating a tag it’s simple. Just write the string in the related area:
Continue reading “How to remove unused tags on Visual Studio Online”
Don’t be fooled by the title of this post: while counting the number of rows in a table is a trivial task for you, it is not trivial at all for SQL Server.
Every time you run your COUNT(*) query, SQL Server has to scan an index or a heap to calculate that seemingly innocuous number and send it to your application. This means a lot of unnecessary reads and unnecessary blocking.
Jes Schultz Borland blogged about it some time ago and also Aaron Bertrand has a blog post on this subject. I will refrain from repeating here what they both said: go read their blogs to understand why COUNT(*) is a not a good tool for this task.
The alternative to COUNT(*) is reading the count from the table metadata, querying sys.partitions, something along these lines:
Many variations of this query include JOINs to sys.tables, sys.schemas or sys.indexes, which are not strictly necessary in…
View original post 82 more words