|
|
-
|
|
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......
|
|
-
|
|
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......
|
|
-
|
|
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......
|
|
-
|
|
We all know how backup is important. I usually say that restore is more important than backup. We can create backup but if we don’t know how to restore it, or we cannot because it isn’t correct we have nothing. So always check your backups and restore it on different locations. In situation wh......
|
|
-
|
|
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 ......
|
|
-
|
|
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......
|
|
-
|
|
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......
|
|