|
|
-
|
|
I’ve played with SQL Server Denali and found some new features and improvements in Query Execution plan. My intention was to test Extended Events and new events: sort_warning and hash_warnig. In SQL Server 2008R2, we can create SQL Trace to capture sort and hash warnings but there is no easy w......
|
|
-
|
|
SQL Server Denali brings us new string function, FORMAT function. It will make formatting of date/time and number values easier.
Syntax: FORMAT (value, format [,culture])
Formatting Date/Time
Let’s see how it works:
DECLARE @a datetime = getdate()
-- If the culture argument is not provide......
|
|
-
|
|
Yesterday I saw a question about required permission for changing SQL Server login password and I decided to write a blog post about it. Question was: I have a SQL logins: Login1 and Login2. I gave ALTER LOGIN permission on Login1 to Login2 so that Login2 can change the password for Login1. But when......
|
|
-
|
|
In SQL Server 2008 R2 we can create database role, assign appropriate permission to it and then add users or groups as a member of database role. It works well for database level permissions. For server level permissions, we can only add user in one or more predefined fixed server roles or assign in......
|
|
-
|
|
SQL Server Denali introduced 2 new logical functions: IIF and CHOOSE.
IIF function
IIF function returns one of two values, depending on whether Boolean expression evaluates to true or false.
Syntax: IIF (boolean_expression, true_value, false_value)
IIF function is simple replacement for:
Case ......
|
|
-
|
|
CONCAT() is new string function in SQL Server Denali. It returns a string that is the result of concatenating two or more string values (or values that can be converted to string).
Syntax: CONCAT (string_value1, string_value2 [, string_valueN ] )
With CONCAT function, you can concatenate between 2......
|
|
-
|
|
Did you ever need to see what execution plan will optimizer choose for your query on large set of data but you have a really small test database? Or you are testing your notification system for sort warning, for example, and you need to force query optimizer to think that tables used in a query are ......
|
|
-
|
|
Recently I worked on a performance tuning of a database and noticed a lot of user created statistics. I checked few of them and saw that lots of user created statistics are multi-column statistics and some of them have a filter defined. There was no documentation of created statistics and I wanted t......
|
|
-
|
|
Simple parameterization is SQL Server feature which allow the optimizer to parameterize submitted queries. If submitted query has no parameters and has constant values plugged in, the optimizer can choose to treat constant values as parameters and automatically create parameterized query and executi......
|
|
-
|
|
Yesterday I run into interesting situation with DBCC CHECKDB WITH ESTIMATEONLY command. Later I find out that it’s a known bug in SQL Server 2008 R2, but I experienced it for the first time and I think that it’s a good topic for my post. Here is the story.
Yesterday, after I restored database from ......
|
|