Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft SQL Server 2008 Management Studio - Connect/Server/Instance Issue

firstly i recently installed this program as I’m working on a project to create a database to use in Microsoft visual studio.

This is the first time I’m using the program, so I’m having a few problems setting it up. I can't connect to a server because presumably i don't have one. I typed in my machine name to create a default/localhost server using windows authentication but i received an error.

Error:

TITLE: Connect to Server

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)

Could someone guide me on how i can setup up a local host to connect and thus be able to create my database. Also I’d like to know afterwards how i can create a server (ftp) to connect into and create my database there allowing me to view this on my laptop or a different machine.

Btw i have looked on Google for this, but I’m getting a bit confused, because I’m unsure what I’m searching for. If anyone can shed some light on my problem i would be greatly appreciated.

Thanks.

like image 667
Kay Avatar asked Jul 24 '12 11:07

Kay


People also ask

What are the reasons if you are not able to connect SQL Server through SSMS?

Check to see if allow remote connections for this server is enabled. In SSMS, right click on the instance name and select Properties. Go to the Connections tab and make sure Allow remote connections to this server is checked. If you need to make a change, you must restart the SQL Server instance to apply the change.

Can't connect to SQL Server instance remotely?

Right-click on your server name and click 'Properties'. Go to the Security page for Server Authentication, and select 'SQL Server and Windows Authentication' mode. Then, go to the Connections page and ensure that "Allow remote connections to this server" is checked, and click OK.


3 Answers

  1. Does Your server name looks like : "localhost ( or IP of Your server )"\"server name", E.G : localhost\SQLEXPRESS
  2. Open application on Start -> -> Configuration Tools -> SQL Server Configuration Manager
  3. Check, if MSSQL Server Service was started in :Sql Server Configuration Manager -> SQL Server Services. If not, right click on service and choose Start
  4. Check on Configuration Manager on "SQL Server Network Configuration" does "TCP\IP" protocol is enabled and has "Listen All" enabled
  5. Check, do You have firewall on port 1433

If that doesn't help, write a message

like image 180
Norbert Ozdoba Avatar answered Oct 17 '22 09:10

Norbert Ozdoba


I faced same problem and I have solve this problem by doing following 2 step:

1st Task:

Open application on Start -> -> Configuration Tools -> SQL Server Configuration Manager Check, if MSSQL Server Service was started in :Sql Server Configuration Manager -> SQL Server Services. If not, right click on service and choose Start Check on Configuration Manager on "SQL Server Network Configuration" does "TCP\IP" protocol is enabled and has "Listen All" enabled

2nd Task: Provide Server Name : [hostname]\SQLEXPRESS Authentication : SQL Server Authentication or Windows authentication Note: If Server you have installed with Mixex mode then only it will work for SA (SQL Server Authentication) or else we need to used Windows authentication

Now you should be able to connect if you follow this 2 task.

like image 45
Gautam Avatar answered Oct 17 '22 09:10

Gautam


-> Go To SQL Server Configuration Manager
-> Click to SQL Server Services
-> Right click to SQL Server(MSSQLSERVER) and click start, then see the magic.

like image 33
Arun Avatar answered Oct 17 '22 07:10

Arun