Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday 14 August 2016

Error while connecting to SQL Server



This blog is all about the problem that we faced after entering the correct credential and still we are not going to login/connect to our database.

In this blog, we are actually going to see what the error message says and possible solution for the network-related or instance-specific error.
 
Figure-1 Cannot connect to Server


But first we’ll go through what the error says-

You will find detailed information of error on the error window itself. Once you click the Copy message text button. I have copied mine database error to provide you some help. Try read it out.


Figure-2 Copy Error Information


TITLE: Connect to Server
------------------------------

Cannot connect to LENOVO-PC.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------

The system cannot find the file specified

------------------------------
BUTTONS:

OK
------------------------------


Solution

There are multiple reasons to get "network-related or instance-specific error", we have marked solution for every possible reason. Now, it’s you to find out which reason is responsible for your error window:

A) Reason 1: Make sure that you are providing correct credential.


Figure-3 Incorrect Login Credential


Just cross check, whether you are selecting/entering correct input
(i) Server Type like Database Engine/Analysis Services/Reporting Services/Integration Services.
(ii) Server Name like LENOVO-PC(mine) or some IP like xxx.xxx.xxx.xxx
(iii) Authentication mode like Windows/SQL Server.
(iv) Correct Login and Password. Also, check the Caps Lock Key and Num Lock Key of your keyword because it is CASE-SENSITIVE.


For any query, comment us below.

Previous - Top 10 Run Commands - #3
 
Next - Error while connecting to SQL Server #2

Related Questions: -


Q-1 Which of the following services does a MSSQLSERVER process have for Microsoft window service console?
I) Start Service
II) Stop Service
III) Pause Service
IV) Restart Service
V) Resume Service

Choose the correct option from below given alternatives:
A) I, II
B) I, II, IV
C) I, II, III, IV
D) I, II, III, IV, V
Ans- Option (C).
 



Click imagination hunt to read latest blogs.

Posted By - +Manish Kumar Gautam +LIVE VIAR +ASP.NET SOLUTIONS

Keep learning and sharing...

3 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. I have tried your suggestion but It didnot work. I am using Windows authentication.

    ReplyDelete
    Replies
    1. Just go through the part-II of the "Error while connecting to sql server" article.

      Hope you will find the solution.

      Delete

Featured post

Think that makes you rich and richer

 Napolean said: “You can think and grow rich, but if you can be brought up like most people with work and you won't starve, this wil...