Unable to connect to SQL Server 2008 R2 instance with management studio - sql-server

I have SQL Server 2008 R2 installed on my PC running Win 7 x64. I used to use it every day with a connection from management studio (Windows Authentication). But, for some reason, management studio is not accepting my connection anymore after I installed DB2 on the same PC.
I know that the instance is not broken since I am able to connect well with Visual Studio 2010 where I also tried creating new DB, inserting records etc.
How do I mend this problem with management studio? How might installing DB2 have affected Management Studio?
I am getting following error:
TITLE: Browse Server for Database
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: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server, Error: -1)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

It's not an authentication issue, as you would get a different error. If this is a named instance, you need to ensure the SQL Server Browser service is started.
I'm guessing you also have TCP/IP protocol enabled?
I don't know much about DB2 but maybe there is some conflict with the ports used. By default SQL Server uses 1433 for the default instance, and 1434 for SQL Browser to dynamically allocate a port for named instances. Check these to make sure they are still good.

Make sure that you have port opened on target server.
Use Telnet (install from Control Panel -> Turn Windows features On of Off)
>telnet <server-ip/name> 1433
or network scanner from nmap.org
>nmap -sT -r -n -vv -p1433 <server-ip/name>

Related

Unable to connect from local to SQL Server in Virtual Machine on Windows Azure

I'm trying to connect from a local SQL Server Management Studio to a SQL Server hosted in a VM on Azure.
I followed all the instructions from
http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-sql-server/ and created the necessary endpoints:
Somehow, I can't connect to the SQL Server, getting this error
Cannot connect to xxx.cloudapp.net.
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: 53)
The network path was not found
I already tried to temporary disable the windows firewall on the vm - without success. Any suggestions?
I had the same problem, this troubleshot helped me getting close to the solution:
Use SQL Server Management Studio to connect remotely to an SQL Server Express instance hosted on an Azure Virtual Machine
Summing up, what i did, i don't know if all these steps are necessary, so you should test after each one:
1) In SQL Server configuration manager enable Named Pipes in protocols
2) In the VM add a windows firewall inbound rule for sql server port (in my case the default 1433, in yours it seems to be 1435, make sure it's 1435 in sql server configuration)
3) Make Sure you are using a sql server authentication login (not a windows authentication) if you don't have one create it locally in the VM>MSSMS
4) Make Sure the SQL server is configured for mixed authentication (http://www.katieandemil.com/microsoft-sql-server-error-18456-login-failed-for-user)
5) Make sure sql server browser is running
Hope this helps :)

Unable to connect to the database engine using SQL Server management studio

I installed SQLManagementStudio_x64_ENU from Microsoft site on my Windows 7 Home Premium.
It gave me compatibility warnings but I still installed because Microsoft site specified that I would receive warnings but suggested to click on Run Program, which I did.
It was successfully installed. I checked Services.msc, and I can see two SQL Server services are running. I checked SQL Server Configuration, and I can see services running under automatic mode, and the agent is off.
When I open my management studio and try to connect using "Server name" option, I can't see any server instance in browse option. There are no servers to connect. I am not able to connect to the database engine. I have tried at least 10 times, but still, it's not allowing me to connect.
I get the following error:
A network-related or instance-specific error occurred while establishing a
connectionto 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) (.Net SqlClient Data Provider)
Can someone help me with this problem?
In the Connect to server dialog of the SQL Server Management Studio (SSMS), type <your machine name>\SQLServer2008 to connect to SQLServer2008 instance. Otherwise, type <your machine name> alone in the server name text box to connect to the default instance SQLExpress.
Following link discusses how to fix the error Microsoft.SqlServer.Management.Dmf.PolicyStore
SSMS 2008 on Windows 7 throws exception when connecting Object Explorer

Unable to connect to remote SQL Server 2008 R2 Express

I'm so frustrated I'm going to give all of my rep points if someone can help me with this.
Scenario:
There was a domain name change and the development server had a SQL Server Express working. Since I have forgotten the SA password and was not able to login with any account from the new domain I decided to uninstall and re-install a new SQL Server 2008 R2 Express.
I installed SQL Server Express from WPI with management studio. After the installation I can open the local server with Management Studio, but cannot open from a remote Management studio.
What I did to try to figure out WTH is going on:
I made sure Remote connection was checked on the SQL Options "Connections"
I enable TCP/IP and Named Pipe on SQL Server Configuration for my instance SQLEXPRESS
I ensure that the port was OK on Properties of TCP/IP of the SQL Server Configuration, there were no value at first, so I manual entered 1433, stop, start the server, try to connect.
a) I even try playing with the Active / Enable value, and with a stop, start, re-try in between every any changes.
Disable the Windows Server 2008 firewall, even added a manual rules for 1433.
Make sure the instance name was good on hkey_local..\software\ms\sql\... and the one I see on the local Management Studio, it's SQLEXPRESS
I can ping the server with its name or ip address, I even tried to connect with the IP address as well.
I'm just trying to connect from another server with another Management Studio, and here is the error I get:
Cannot connect to DEVSERVER\SQLEXPRESS.
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: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server, Error: -1)
The server is a Windows Server 2008 x64
What a time waster
TIA for any tips, can't believe what's happening.
UPDATE:
I telnet from the remote server on port 80 just to make sure it's not a network problem, and I got HTML result, since firewall is disabled, and tcp/ip is enabled, SQL Browser started, Remote connection is activated it's hard to put the finger on what's not OK.
We had the same problem, finally figured out that a dynamic port entry has to be given along with the SQLExpress login .. ie 192.168.1.25\SQLEXPRESS,45490... then it allowed the login to happen.
We had installed a new SQLEXPRESS 2008 R2 (Windows 7 Professional Edition) in a new machine & was trying to connect to this DB from another machine from the mgmt studio and it was not connecting, nor was it connecting from any of the client machines.
We tried to check the SQLEXPRESS Browser / TCPIP was enabled and spent couple of hrs before we we figured out that the Dynamic port was causing this issue.
You can find this information, Open the SQLEXPRESS Configuration Manager, Select SQL Server Network Configuration on the left menu![Configuration Manager][1]
Select Protocol for SQLEXPRESS
You will find the TCPIP Enabled on the right side, click on the TCPIP and select properties
go to IPALL .. you will find the dynamic port info there.
btw, we tried installation on two HP PCs had the same issue & was solved with the dynamic port, while when we tried the installation on the ACer PC - did not get this dynamic port issue - so not really sure if it had anything to do with the OEM OS setup !?
However, the above solved our situation.
Last time this has happened to me, it was because I forgot about the SQL Server Browser service.
Did you try these steps: http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx ?
SQLEXPRESS is named instance, so it doesnt listen on 1433 port (it's for default instance). Try this:
Disable firewall
Start SQL Browser
Try to connect from remote machine
My problem solved by using the server configuration manager to disable the dynamic port (blank = disable), and fix the port to 1433

SQL Server 2008 R2 connection on a VmWare Instance

Here is the scenario I am facing.
I have installed Windows 7 Professional on a VMWare.
Installed SQL Server 2008 R2.
When I launch the Server Management Studio and try to connect to the instance I get the following error
"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: 53)"
Now, I installed all the packages of SQL server with default settings. The only change that I had done is selected a mix-mode for authentication.
I setup a similar instance on a desktop and it works fine. Before posting it here I have searched on the web and made sure all the services, ports and protocols are enabled/running.
But I still cannot seem to connect, any help?
Ok, so finally found the solution the above mentioned problem. Not sure why, but when I give the instance name pre-appended with .\ it works fine.
.\<INSTANCENAME>
You may not have a default instance installed?
http://msdn.microsoft.com/en-us/library/ms143531.aspx

Error while connecting to external SQL Server with an IP using SQL Management Studio 2005

Error while connecting to external SQL Server IP using SQL Management Studio 2005 address
TITLE: Connect to Server
Cannot connect to 1.2.3.4\SQLEXPRESS.
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: SQL Network
Interfaces, error: 26 - Error Locating
Server/Instance Specified) (Microsoft
SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
By default, SQL Server 2005 doesn’t allow remote connection so you have to enable it manually. So if #abatishchev's solution doesn't get you going; it may be you haven't set the permissions to connect.
Run the Surface Area Configuration Manager (it should be in the SQL Server folder in My Programs under Configuration Tools).
Choose Surface Area Configuration for Services and Connections
Select your server expand database engine and then remote connections and enable TCP/IP and / or tcp/ip and named pipes. Click Apply.
Whilst you are here check the SQL Server Browser is set to run. Expand it out and choose the service; change the startup type to be Automatic.
Try again in management studio express to connect to the machine.
Make sure that remote server allows connection to port 1433/tcp, e.g.:
using telnet client (in Windows 7 isn't installed by default, to install use Turn Windows features):
telnet 1.2.3.4 1433
or using nmap (port scanner)
nmap -sT -r -n -vv -p1433 1.2.3.4
If doesn't allow - check inbound firewall rules.

Resources