In a series of blog posts we will have a look at the new SQL Server 2012 table type called FileTable. This first blog post will be a simple getting started – how to create a FileTable and how to dump files into the folder and do some simple file… Read more
I am proud to announce that we at Geniiius will be speaking at DDC 2012. DDC 2012 is a one day event held in Horsens, Denmark on the 29th of February 2012. You can sign up for the conference by following this link.
DDC 2012 is all about… Read more
With SQL Server 2012 comes a new set of conversion functions, that will certainly help doing type casts and conversions in t-sql. These functions are:
Syntax from BOL:
TRY_PARSE ( string_value AS data_type [ USING culture ] )
This function works similar to the well… Read more
I’m sure that I’m not the only one with nightmares about the startup parameters in older versions of SQL Server 200x – the design and UI is just bad, it is so easy to forget a semicolon or mess up the syntax – and to end up with SQL Server… Read more
With SQL Server 2012 a new string function is born – CONCAT(). The output is a string, as the result of the concatenation of two or more strings – if the input is another type than string a conversion will be done implicit. The CONCAT() function takes between 2 and… Read more
Normally I’m not a big fan of using traceflags, my advice is only to use these when it is absolutely necessary otherwise don’t. Here is a list of the documented traceflags that you can use with SQL Server. That is the documented once, besides that there is a list of… Read more
Finally it is here, the SQL Server 2012 RC0 is ready for download, click this link and you’ll be downloading the good stuff in seconds. While you are downloading, you might want to have a look at some of these links, to read the official Microsoft information on what’s new… Read more
Microsoft has recently released the licensing overview for SQL Server 2012. A few things has changes from SQL Server 2008, and I will just give a brief overview over these changes.
CPU vs core
The first major change in my opinion is the change from CPU socket licensing to… Read more
A few weeks back a client of mine asked me to write a script that could tell him the space used by write only indexes. The usage stats from the indexes is pretty easy to get from ‘sys.dm_db_index_usage_stats’ and if you join the DMV ‘sys.dm_db_partition_stats’ onto… Read more
Have you ever wonderet how long you need to wait for a backup or restore command to complete? If you perform the backup or restore from the gui in management studio, it shows you the progres for every 10%. But what to do if you issuet the backup or restore… Read more
A while back i was creating a stored procedure to be used for pulling data from the SQL Server into cacti. The procedure was pulling data from a rather large table, which I had made sure was indexed properly for my query. When I executed the stored procedure from… Read more
One of the main goals with this blog is to write stuff when we learn / discover new things or smarter and more efficient ways to do things – and that is spot on what I’ll do today.
Finding the time when SQL Server was last restarted, and using that… Read more
We all know that SQL Server loves memory, and in my opinion SQL Server can never have to much RAM. RAM is faster and cheaper than IO capacity and RAM can reduce the pressure on the IO sub system.
Let’s see if we can write some diagnostic queries that can… Read more
Last week I blogged about how to get help identifying possible missing indexes by using some of the DMV’s provided by SQL Server. This week I will show another one that can be used to see how often a given index has been used.
The DMV is this one:
One of the most common things I encounter when asked to help with performance problems, is wrong or inadequate indexing. Creating the optimal indexes for a system, is no where near a trivial excercise. You need to consider the read/write ratio as well as how you write your queries. This… Read more
A few weeks back we did a blog post about a file grow bug that has been fixed with SQL Server Denali (Autogrow bug – fixed with Denali). The same blog posted explained why it is important not to have millions of VLF’s (Virtual Log Files). The method… Read more
We have all been in a situation where we had to get the last day of the month with T-SQL. The world would just be so much easier with 30 days in every month, which is not the case. To calculate if the last day is 31, 30, 28 or… Read more
Three months back in this blog post – T-SQL Enhancements in SQL Server Denali (2011) – we promised to do a series of blog posts, focusing on some of the new T-SQL enhancements that we all are looking forward to in SQL Server Denali.
This is not a post to… Read more
If you are an old Access or Excel “developer” you know this one. This is not a function I have been missing before I read about it today. If you, like me, is so tired of writing CASE statements with only 2 possible outcoms – you will love… Read more
A couple a weeks ago I blogged about a few of the enhancements in the OVER clause, and now I will show you guys a couple of new windowing functions, that goes along with the OVER clause. These new functions are FIRST_VALUE() and LAST_VALUE().
I’ll use the same setup… Read more