Link to home
Create AccountLog in
Avatar of nabilhammoud
nabilhammoud

asked on

Why the sql server 2008 service is not running?

Hi,

I run SQLManagementStudio_x86_ENU and download server 2008 on my local computer.
When I am trying to connect to a sample database through the SQLManagementStudio tool, it shows error as shown on image2. Why and how to fix it. I want to use my PC as the local server.


Image.png
image2.png
Avatar of nishant joshi
nishant joshi
Flag of India image

this is because of you might not having access to that server.add your user to server it works..
Avatar of nabilhammoud
nabilhammoud

ASKER

I am using my local computer and I install server 2008 on same local computer.
did you add yourself as system admin while doing the installation? builtin administrators are not sys admins anymore starting with sql2008
I suggest you change the name from (local) to forexample . it should mean the same. If you still cant connect, open your SQL Server configuration manager to check the Sql server instanse. If it is running, and the named pipe protocol is enabled, you should be able to connect to it.

You could also try to open the tcp/ip protocol, and point to your sql server instance by using the IP address, but then you also have to open the 1433 incoming port in your local firewall.

It might also happend that you forgot to add your current user to the administrator users for the SQL Server during install. What I always do, is to enable both your current user, and the SA user during install. If one fails, then you always can try to log in with the other.
I checked and every seems to work properly on my system, plus I disable the firewall.

When I access again the SQL manager, I select the server type as: SQL server as compact edition.
I invoke a new database name, and it works.

Why I am not able to use the  Database engine?

ASKER CERTIFIED SOLUTION
Avatar of kjetilroe
kjetilroe
Flag of Norway image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
You can have several SQL Server Instances on your computer.

One could be default, others are NAMED.
You can verify it in CONTROL PANEL / ADMIN TASKS / SERVICES
The name of the service like SQL.... - it is self explanatory.

To connect to named instance you must choose it instead of local - which is default.

These multiple SQL Server instances can come with some products like VS.
------------

BTW, if you don't use all of them - you can set service start to MANUAL - it saves a lot of resources on your computer. And if you will need them in future you can set what is was back or start manually.
Here are the critical questions you need to answer:
1.  Is the SQL Server service running?
2.  What is the name of that SQL Server service?
Please try below :

1) For all of you who are having the error:40 and Error:2 after installing Sql Server 2005, you may take a look at the Sql Server Service.  Although it was not disabled, it was set to automatic but not started.Once you started it, it will work.

2) http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

Good