SQL SERVER – FIX – Linked Server Error 7399 Invalid authorization specification

I have personally seen when people use Linked Server there are a number of issues from authentication to performance. These issues are part of working with something that has so many variations and permutations of actually going wrong. Many a times I suggest people to keep away from Linked Servers as much as possible. But it cannot happen all the times and there are code blocks in their application that relies on this as a requirement.

Read More

SQL Server 2016 Management Studio – Warning: SSMS install detected shared components on this machine

As soon as SQL Server 2016 Management Studio was released on 1st June 2016, I tried installing it. This is a great way to learn and I love to get going as soon as the new software gets released. I especially get excited when it is related to SQL Server. If you have not known new process to install SQL Server Management Studio, then you should read below the blog.

Read More

SQL SERVER 2016 – How to Use SQL Server 2016 – Stretch Database – Notes from the Field #127

[Notes from Pinal]: First of all, last week SQL Server 2016 released. If you have not downloaded the developer version for free. You can download from here. SQL server 2016 has many different features which are related to performance and stability. One of the feature which attracted me very much is stretch database. I am sure of the name, you might have understood that it is about extending the current features of the SQL Server. Well, the feature is very interesting, and to understand how it works, you will have to read this entire blog post.

Read More

SQL SERVER – System Objects Not Visible in SQL Server Management Studio

There are so many settings in SQL Server Management Studio that it can sometimes make someone nervous. Once of my client sent me email telling that something is not right with their SQL Server 2016 installation. Here is an email which I received:

Hi Pinal,
One of the developer has installed SQL Server 2016 on our development environment. I already had SQL Server 2014 running on the server. I am seeing a strange behavior in SQL Server Management Studio. When I connect from SSMS 2014, I am seeing system views as you can see below.

Read More

SQL SERVER – How Much Free Space I Have in My Database?

This is one of the simplest query that I wrote for one of my consulting customers who asked me. When I was discussing with the customer on some of the best practices of working with SQL Server, I was telling him not to use the autogrowth as a regular feature to use. I wanted the DBA to make sure that the autogrowth never gets called. The immediate question was – how do I know I need to increase my database files? When should I be doing them? In What maintenance cycle should this be done to find Free Space.

Read More

SQL SERVER – Vertical Select Mode feature in SQL Server Management Studio

During last SQL Bangalore user group meeting, Balmukund presented a surprise session of tips and tricks with SQL Server Management Studio. Even though I was not able to attend the event due to travel abroad, I contacted Balmukund to share what he presented.

He was kind enough to give me a list. One of the things which I didn’t know was the usage of vertical block select mode. I have been using block select mode to cut the text by selecting it. This needs a mouse and I found that there is no keyboard shortcut.

Read More

Sort Query Using Dynamic Variables Without EXEC – Interview Question of the Week #074

It does not matter which version of SQL Server we are using, I think this question is going to be there universally all the time when people want to sort query using dynamic variables. Trust me, this is indeed a popular question. After 14 years of experience in the industry, just last week, I was asked this question when one of my clients was evaluating me to tune their queries. Well, for a moment I thought the client should know that I know these kind of questions. Next moment, I realize that this is my opportunity to impress them as they do know the answer.

Read More