Cannot connect to a SQL Server 2008 named instance; How to resolve

Last month, I had this issue where a couple of applications had issues authenticating to a SQL Server 2008 R2 instance. So I started to troubleshoot this issue by duplicating from my workstation and finally arriving at a solution. This blog will explain what was caused this issue and the solution to that issue.

This SQL instance (that I had issues) is a 2008 R2 SQL Cluster and named instance, but it was configured to be accessible through the port 1433. So the SQL Instance was accessible both ways as (“clustername” and also as “clustername\instancename”). After a maintenance over a weekend (what is done on that cluster, what settings have been made and why is way out of topic in this blog), we started to have couple of applications not being able to authenticate to this SQL instance.  At first I could not think why this was happening, as I was able to see several users and applications connected to this instance and working fine (All SQL jobs running etc etc). I tried to login to that SQL instance (I commonly use just the clustername to connect) and was successful. Thought the individual accounts these applications are using to authenticate, have been disabled, but that was not the case, and lastly when I tried to login using the entire clustername\instancename then I found that I was having the same authentication failed error that those applications have been reporting. 

Solution

After looking at the state of SQL Services in SQL Server Configuration Manager, I found that the SQL Server Browser Service, though the Start Mode was set to Automatic, it did not start and was causing this issue. So I started the service and tried to login using the  clustername\instancename and it started to work…

SQL Server Browser

The above pic is how it looked on my server when I saw the services in configuration manager. (Note that this screen shot is from my lab not the actual server where this issue occurred).

Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

–Bru Medishetty

Product-Ads-75-Clicks_728x90._V174189179_

How to assign Server Admin role for a user in SSAS

In this blog we shall look at the steps to add a user into the Server Administrators Role in SQL Server Analysis Services (SSAS). Let’s get started..

Connect to the SQL Server Analysis Services from Management Studio (SSMS), once connected, right click on Analysis Server (as shown below) and select Properties. ssas-1Once you click Properties, the Analysis Services Properties dialog box appears, then click Security page, to show the list of users who are currently Server administrators (shown below)..ssas-2 Click on Add button and type the name of the user and click OK button.ssas-3 The user is now part of the Server Administrator group on the Analysis Server now.. To cross check click on the Security page on the Server Properties.ssas-4Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

–Bru Medishetty

Posted in Uncategorized | 1 Reply

How to find the Table which has Maximum Columns in a database

If you are interested to know about the table (in a particular database) that has most number of columns and how many columns.. You can run the below script..

SELECT NAME AS Table_Name, max_column_id_used AS Total_Columns
From SYS.tables
WHERE max_column_id_used =
(SELECT MAX(max_column_id_used) FROM SYS.tables)

As shown in the below screen shot, it will list the table and the number of columns in that table..

Table_with_Max_Columns

Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.

–Bru Medishetty