|
|
-
|
|
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:
TRY_PARSE
TRY_CONVERT
PARSE
TRY_PARSE()
Syntax from BOL:
TRY_PARSE ( string_value AS data_type [ USING culture ] )
This function works sim......
|
|
-
|
|
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 that is not able to start. Here is a little screen shot to s......
|
|
-
|
|
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 254 parameters.
Here is how the s......
|
|
-
|
|
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 undocumented traceflags – and it ......
|
|
-
|
|
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 in SQL Server 2012 RC0 – y......
|
|
-
|
|
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 per-core based. This elim......
|
|
-
|
|
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 that, you can from the column ‘use......
|
|
-
|
|
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 command yourself, and did not specify the s......
|
|
-
|
|
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 SQL Server Management Studio it ran ......
|
|
-
|
|
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 timestamp to calculate the actual runtime is......
|
|