Click here to Skip to main content
11,924,825 members (55,511 online)
Rate this:
Please Sign up or sign in to vote.
my Sql server is working fine but after i restated my Computer and the i opened my sql server 2008 and press the connect button it shows me this error

TITLE: Connect to Database Engine
Cannot connect to (local).
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:


please help me i have created the database and also i have no recent backup of that database.
all my connections are close

Please help me
Posted 1-May-13 6:28am
ryanb31 1-May-13 11:29am
Your service is not likely running. Look in services and make sure SQL is running.
engr.hinaiqbal 1-May-13 11:47am
from where to check that the services are running or not
ryanb31 1-May-13 11:50am
Admin Tools, Services.
engr.hinaiqbal 1-May-13 12:01pm
SQL Server(SQLEXPRESS) has the status started but SQL Server(MSSQLSERVER) has no status
ryanb31 1-May-13 12:04pm
It's your server. I don't know which one is right or wrong.
engr.hinaiqbal 1-May-13 12:11pm
there is also one service whose name is server and is used for file,print and namedpipe sharing over the network for this computer and its status is started

When i connect my sql server using .\SQLEXPRESS or Name-PC\SQLEXPRESS it establishes the connection but it does not show my database which i used. and when i want to connect using Name-PC server name or local it generates the above mentioned error
ryanb31 1-May-13 12:24pm
Sounds like you need to turn on SQL Server(MSSQLSERVER)
engr.hinaiqbal 1-May-13 12:28pm
when i start this SQL Server(MSSQLSERVER) the message is displayed that windows couldnot start SQL Server(MSSQLSERVER) on Local Computer
ryanb31 1-May-13 13:33pm
You need to find the error. Better yet, you need to find the whoever manages this server and ask them.
engr.hinaiqbal 1-May-13 14:10pm
this is my server installed on my local machine and there i installed visual studio 2012 which i used for my project development and for database used SQL Server 2008
ryanb31 1-May-13 14:11pm
So, do you remember which SQL to use then?
engr.hinaiqbal 1-May-13 14:18pm
SQL Server(MSSQLSERVER). but it does not start any solution that can solve my problem is appreciated because i am stuck with it and can't do any work.please help me
ryanb31 1-May-13 14:18pm
I know it does not start. I asked you to find the error. Look in th event viewer.
engr.hinaiqbal 1-May-13 15:57pm
Log Name: System
Source: Service Control Manager
Date: 5/1/2013 6:39:00 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Awais-PC
The SQL Server (MSSQLSERVER) service terminated with service-specific error WARNING: You have until SQL Server (MSSQLSERVER) to logoff. If you have not logged off at this time, your session will be disconnected, and any open files or devices you have open may lose data..
Event Xml:

<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />




ryanb31 1-May-13 16:04pm
Search google but it looks like you might have your drive compressed, or at least the folder where the data files are. Did this used to work?
richcb 1-May-13 11:29am
Is "local" the name of your server or db engine?
engr.hinaiqbal 1-May-13 11:46am
local is the sever name
ThePhantomUpvoter 1-May-13 11:30am
Did you bother to check if the services are running? Did you check your event logs?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


No instance of SQL Server is running. You can start an instance of SQL Server using the SQL Server Configuration Manager:[^]


If the Configuration Manager isn't installed, use the net commands to start an instance of SQL Server:[^]
engr.hinaiqbal 1-May-13 12:15pm
i have seen the link mentioned by you but
On the Start menu, point to All Programs, point to Microsoft SQL Server 2008, point to Configuration Tools, i am unable to see SQL Server Configuration Manager. there is only SQL Server Installation center
ProgramFOX 1-May-13 12:24pm
I updated my answer.
engr.hinaiqbal 1-May-13 14:12pm
i have used your second link command net start "SQL Server (local)" but it displays that the service name is invalid
ProgramFOX 2-May-13 11:21am
Try net start MSSQLSERVER

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.3 | Last Updated 1 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100