Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Latest Blog Posts

Tempdb Allocation Contention in SQL Server

In SQL Server, the concurrent creation of temporary objects (temporary tables and table variables) from many sessions can lead to tempdb allocation contention. This contention occurs on PFS and SGAM pages in tempdb (like PAGELATCH_EX and PAGELATCH_SH waits). It is recommended to create additional data files for tempdb and implement… Read more

In-Memory OLTP Memory Optimized Table Variables Vs Disk Based Table Variable in SQL Server

Starting SQL Server 2014, it is possible to use memory optimized table variables. These are table variables declared using a table type which is memory optimized. Memory optimized table variables have no disk footprint and don’t have PAGELATCH (like PAGELATCH_EX and PAGELATCH_SH) or LOGBUFFER waits, hence they result in faster… Read more

Temp Table Caching in SQL Server

SQL Server caches temporary objects (temporary tables and table variables), that are created in a stored procedure. Temporary objects that are created either in dynamic SQL statement or by using sp_executesql are not cached. Temp table caching can lead to better performance by reducing Tempdb Allocation Contention. SQL Server… Read more

Understanding ASYNC_NETWORK_IO Waits in SQL Server

In SQL Server, ASYNC_NETWORK_IO wait time can be high due to slow network, like when the database is in the cloud and the application is on premise. Furthermore, it can be slow when CPU utilization is high in the application server preventing timely fetching of all rows or, in most… Read more

SQLPASS SUMMIT 2016 Discount Code

SQLPASS SUMMIT 2016 is around, only few months left for this super event. Probably you all would have heard about the SQLPASS SUMMIT but let me just brief you about this event. This event happens every year during October in different cities in USA, 3 days event. Well, you would…

Read more

Resource Governor in SQL Server – Workload Throttling

Resource Governor in SQL Server provides CPU, Memory and I/O throttling. In SQL Server 2014 and earlier, CPU throttling works only for similar kind of workloads and not for mixed workloads, where high importance workload group gets 9 slices of CPU, medium importance gets 3 slices and low 1 slice.… Read more

The Mysterious Black Box of R - For the SQL Server Guy

Took a class from Jamey Johnston @ SQLSaturday #516 in Houston. Lots of great information covered. Follow him for a much more detailed perspective on R. Jamey Johnston on Twitter @StatCowboy. Did a basic walkthrough of running an R query, and figured I'd share it as it had been a… Read more

0 comments, 1,931 reads

Posted in SQL Barbarian on 14 May 2016

Hello SQLSaturday Houston!

I've been looking forward to speaking at SQLSaturday Houston again all year!

Big thanks to the organizing crew behind this great event, poised to be Houston's biggest ever.

I'll be giving a presentation on SQL Server Permissions and Security Principals at 8:30am in room 148.

Also don't miss my colleague…

Read more

0 comments, 154 reads

Posted in SQL Tact on 13 May 2016

Check In Database Scripts in to Team Foundation Server (Using VS 2015)

After TFS server is ready with folders created for databases, you need to take database scripts in your own style and check in to TFS. This is one of the database version control methods.
 Install Visual Studio 2015 and once you launch you need to click on Team (5th

Read more

0 comments, 14 reads

Posted in SQL Articles by Nani on 13 May 2016


I cannot find the login physically though but getting the error while trying to create a new login. 
Use below scripts to fix the issue

 select suser_sid ('Domain\loginName');

Result: 0x0105000000000005150000000C04XXXXXXXXXXXXXXXXXXXXXXXXX

select * from sys.server_principals sp
where sid

Read more

0 comments, 12 reads

Posted in SQL Articles by Nani on 13 May 2016

The New Global Dashboard

Redgate recently released SQL Monitor 5.2, which is the latest upgrade to our monitoring/alerting/troubleshooting product for DBAs. This was the big change that the team has spent a lot of time developing and refining. It’s been available for a few weeks as a hidden URL, but with 5.2, this becomes… Read more

0 comments, 209 reads

Posted in The Voice of the DBA on 13 May 2016

Default Value or Binding blank vs single quotes with no space in the middle.

Got an issue in the SQL table that it is by default inserting NULL values but I need blank values instead NULLs.

You would see this when you right click on table on object explorer. Right Click on table name and click design and highlight the column you are looking…

Read more

0 comments, 8 reads

Posted in SQL Articles by Nani on 12 May 2016

Common Mistake while creating Operators in SQL Server Agent services

The common mistake people do when creating operator for the first time or adding new email IDs in the Email-name list.

Creating Operators:
Below screenshots give over view on creating Operators in SQL Server.

    1)      Right click on Operators folder and click New Operator.

Read more

0 comments, 10 reads

Posted in SQL Articles by Nani on 12 May 2016

Basic Insert Trigger Example

Below is the trigger which triggers every time a record insert in to the table to update below mentioned columns.

CREATE TRIGGERTrg_ServiceTickets ON DBO.ServiceTickets
    DECLARE  @ServiceAddress         VARCHAR(481)
             ,@ServiceAddressCity     VARCHAR(60)
             ,@ServiceAddressState    VARCHAR

Read more

0 comments, 9 reads

Posted in SQL Articles by Nani on 12 May 2016

SQL Nexus

I was lucky enough to be accepted to speak at SQL Nexus in Copenhagen and I attended the event a few weeks ago. This is the new Nordic SQL conference that seems to be replacing the SQL Rally. I’d never been to Denmark, but the trip was easy, and I… Read more

2 comments, 210 reads

Posted in The Voice of the DBA on 12 May 2016

See you Saturday in Houston!

Here’s your friendly neighborhood reminder to get free learnin’ at SQL Saturday Houston this weekend, where we’ll have the MinionWare booth, and sessions all over! Sean’s Monster Text Manipulation: Regular Expressions for the DBA is at 11am My Designing Stored Procedure Solutions is at 2:45pm Sean’s Understanding Backups is at…

Read more

0 comments, 198 reads

Posted in SQL Awesomesauce on 12 May 2016

Use The Correct Data Type

Blog post #5 in support of Tim Ford’s (b|t) #iwanttohelp, #entrylevel. Read about it here.

Saying that you should use the correct data type seems like something that should be very straight forward. Unfortunately it’s very easy for things to get confusing. Let’s take a simple… Read more

8 comments, 1,489 reads

Posted in The Scary DBA on 12 May 2016

Free eBook – Modern Storage Strategies for SQL Server

I’m pleased to announce the general availability of a new free ebook collaboration with James Green from ActualTech Media called “Modern Storage Strategies for SQL Server“.  Storage is so vitally important to SQL Server performance, but the intricacies of one side’s administrators are rarely known by the other.… Read more

0 comments, 2,964 reads

Posted in Technobabble by Klee from @kleegeek on 12 May 2016

Comparing the contents of two tables

I’ve been working on tuning a query for the last week and I’ve had to make several changes to the query’s logic. I’m always a little nervous when making those types of changes so I try to do some careful testing before I even suggest the changes to the developers.… Read more

10 comments, 2,621 reads

Posted in SQLStudies on 12 May 2016

PowerShell – SQL Database Refresh -Restore – Multiple Databases


The purpose of the script is to restore database/s from a database backup. The requirement is to refresh ‘n’ databases.


The advantage is that the flexibility of passing restoreDbList to restore specific group of databases.

The Restore databases has three mandatory paramters

param ([Parameter(Mandatory=$true,Position=0)][String]$SourceServer – Source where you… Read more

0 comments, 795 reads

Posted in PowerSQL By Prashanth Jayaram on 12 May 2016

Newer posts

Older posts