I recently installed MS SQL Server 2008 Developer Edition (on my home PC with Win7 Ultimate 64-bit). I have been trying to get it set up for use, but am having some issue. I keep getting an error when trying to connect to the server. On the "Connect to Server" window, there's a box for 'Server Name'. I thought it was supposed to be MSSQLServer, but it's not working. I am completely brand new to SQL Server and am just starting to learn the language. Any help and advice would be appreciated!

Thanks,

Ryan

Sql server is designed to be ran on a server, and that's why it says server name. It's the computer name. If you have multiple instances of sql server installed, then it will be computer name\instance name. Also, since the management studio and the database engine are both on the same PC, you should be able to use localhost as the server name.

Under Database Engine, I've tried connecting to the server with multiple Server Names including: (local), MSSQLServer, MSSQLSERVER, SQLSERVER, Ryans-PC\Ryan's, localhost, (localhost). Every time I get this error message:

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

Cannot connect to localhost.

------------------------------
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+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

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

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

I AM able to connect to the server under Integration Services using the Server Name: Ryans-PC\Ryan's, for whatever reason. But that name doesn't work for Database Engine, Analysis Services, Reporting Services, or SQL Server Compact Edition.

On the Connect To Server window, there's an Options button that has a Connections Properties tab. Under Network, should I be using (default), TCP/IP, Named Pipes, or Shared Memory?

Thanks,

Ryan

Open services (start->run->services.msc) and verify that SQL Server is started.
Since the database is on the same machine that you are connecting to, shared memory would be preferred but any of the 3 should work for connecting.

Under Services, the items that are running are: SQL Writer, SQL Browser, SQL Server Analysis Services, and SQL Server Integration Services.

There's your problem. The database engine, Integration services, and Analysis services all run independently as separate services. You'll need to locate SQL Server and start it. The description should be : Provides storage, processing and controlled access of data, and rapid transaction processing.

If SQL Server is not present in services, this means you didn't get the database engine installed and you'll need to install it.

See more here: http://social.technet.microsoft.com/wiki/contents/articles/a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server.aspx

Hey, I was having the VERY SAME Problem with same specifications as you are having a moment earlier.

I Tried in the Server Name: (local)/TEST1 and it Worked!
TEST1 is my Instance Name; You might be having the instance name MSSQLSERVER if you have chosen the Default Instance or the instance name you defined earlier during installation.
e.g. (local)/MSSQLSERVER

The only explanation I can give this to work is (local) is our Server and <Instance-name> is the instance we are trying to connect to. [as interpreted from the explanation of buddylee17]

Problem solved! For whatever reason, Database Engine wasn't installed (even though I did a full install when I initially installed it). Weird. So I just had to do a custom install and select only that one.

Thanks so much for your help! I appreciate it!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.