0

I am extremely new to Microsoft SQL Server. I know a good level of MySQL but now I'm wanting to extend my knowledge to SQL and I want to practice writing out queries on the SQL Server Management Studio. I have downloaded and installed the free SQL Server 2008 free on the microsoft website, and then I have done the same for the Server Management Studio 2008. However, to start practising I need to create my database, and to do that, I need to connect to a server. This is where I'm confused, I tried writing out the server name as 'sqlserver'.. something random like that, then I receive this error as shown below:

TITLE: Connect to Server

Cannot connect to sqlserver.


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've spent hours now looking up what I have been doing wrong, I've tried reinstalling the software, running the Management Studio as an administrator and I've also created rules in my Windows Firewall so that it allows the ports for 1433 and 1434. I still keep on getting the same error message.

I'm not sure if I'm doing anything completely stupid in this scenario, all that I know is that I'm desperate to getting this working so I can just start practising and learning the language.

Any help?

Thanks, Dale!

0

If you installed SQL Server and SSMS on your machine directly, check Windows Services to verify SQL is running. If it is, open SSMS and try connecting to "." (no quotes). This will tell it to connect to your local instance of SQL Server. If that doesn't work, can you post a screenshot of your SSMS window as well as the SQL Service listing in Windows Services?

  • Hi, quick question, how can I go about sharing a photo of my screenshot? – user2334014 Oct 1 '14 at 19:31
  • But whilst I'm answering I might as well explain what I can see personally... MSSQL$SQLEXPRESS and SQLWriter are running but SQLAGENT$SQLEXPRESS, SQLBrowser and MSSQLServerADHelper100 all say 'stopped' and when i try to start them it says it cannot because they are disabled or it has no enabled devices associated with it. And for the "." , I got the same error as I posted in the original question :/ – user2334014 Oct 1 '14 at 19:35
  • There's an Image icon when you edit your post. You have to save the screenshot and upload it as an image. – Chris Satola Oct 1 '14 at 19:36
  • Check out: stackoverflow.com/questions/360141/… Does that help? – Chris Satola Oct 1 '14 at 19:38
  • Thanks!!! This helped a bunch! I had to use the server name as my pc name followed by the \SQLEXPRESS ... I don't know why it doesn't mention this in the setup. – user2334014 Oct 1 '14 at 19:46
0

If you installed SQL Server locally, you can use 'localhost' as the server name. In a typical production environment, you'd install the management studio on your workstation, but you would connect to the SQL server elsewhere.

Post a screenshot if you're still stuck.

  • Hi, Sorry to ask the same question to you too but how would I go about screenshotting? I tried using 'localhost' but I received the same error as I posted in the original question :/ – user2334014 Oct 1 '14 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.