Error when connecting to SQL Azure database with SSMS - sql-server

I am getting the following error connecting to a SQL Azure database with SQL Server 2008 R2 Management Studio (I have tried from multiple machines from different networks)
I have no problems regarding firewall rules.
Does anyone have any suggestion on how to solve this problem?
EDIT:
I have tried to change connection information in the "Connect To server" dialog and it worked. More specifically instead of specifying a username for the connection I wrote dbusername#server in the username dialog.
Apart from the fact that the problem is solved I would like to really know why this has changed from yesterday and just find a better explanation

Related

SSMS "Windows logins are not supported in this version of SQL Server"

I am using SSMS (Microsoft SQL Server Management Studio) to connect to an Azure SQL database. I have selected "SQL Server authentication" and entered the admin login and password. For some reason it still tries to use Windows authentication regardless of the authentication being set as "SQL Server authentication" and reports
Windows logins are not supported in this version of SQL Server. (.Net SqlClient Data Provider)
I have tried this on another computer and it works fine (also a different network). This new computer for some reason does not work despite the same server name login and password.
I can connect to the database via Visual Studio SQL explorer on the same PC no problem proving its not a firewall issue.
Why is it not using SQL Authentication?
Secondly how can I simply enter an SQL connection string instead of using the GUI to connect? I have a working SQL connection string which works in C# code but am completely stumped how to use the GUI.
Update
I have tried entering part (or all) of the database connection string into the "Additional Connection Parameters" window which then gives a different error:
A network-related instance-specific error occurred while establishing a connection SQL server. The server was not found or was not accessible (provider: TCP Provider, error: 0 No such host is known). Error 11001
Update 2
edit: After 24 hours the problem has magically resolved itself, PC was not rebooted, nothing was changed.
We are glad that the error is resolved in the end:
"After 24 hours the problem has magically resolved itself, PC was not rebooted, nothing was changed."
Thank for sharing the details for us:
"If I purposely incorrectly select windows authentication I can reproduce the problem. But SQL Authentication works as expected. Definitely something buggy happening here as I tried many many times with different logins, it isn't even possible to enter a login unless you select SQL authentication so I have no idea why it didn't work yesterday other than something to do with the install process which required something to timeout/crash in the background"
If others can provide more analysis, we're still very grateful.

Unable to Connect to SQL Server getting firewall rule error

Its a bit strange. Until yesterday I was able to connect to all of my SQL Servers. Once I restarted my computer, a new firewall seems to have been unexpectedly added. I tried to sign in to my azure account, but I am still getting the same error.
I have had a similar problem myself in the past, and trying to configure firewall settings through SQL Server Management Studio could not solve it for me. Instead I did this:
Log into Microsoft Azure
Go to your SQL Server that you are having difficulties with
From the menu, select "Firewalls and Virtual Networks"
Select "Add Client IP"
Enter your public IP address.
There is also documentation here

I cannot find SQL Server browser

I have installed SQL SERVER 17.
I'm trying to connect to a remote Database and I was not able to do so. After research, I found out that it requires the SQL Server Browser service to be started but I couldn't find the service in the SQL Server Configuration Manager
I also tried searching for missing SQL Browser Service. So, I tried reinstalling the SSMS but I couldn't find any option to select for SQL Browser.
Also, I don't have the sqlbrowser.exe file at location 'C:\Program Files (x86)\Microsoft SQL Server\90\Shared\'. So, I guess it wasn't installed from the start.
Any solution, on how to install the service?
EDIT 1 :
This is the error message on the SSMS:
I have verified and made sure that the username and password is correct.
EDIT 2 :
I tried to turn of my firewall and then connect with the server. But, I still got the same error.
So, I tried to reinstall the complete SQL SERVER. During the installation, I selected the custom mode and selected the SQL Server Browser to be automatic. So, now I have it working.
Now, still having my firewall disabled, I tried connecting to the SERVER, but still I got the same error.
Now the question is why am I getting this error?
Final EDIT :
Sorry for all the trouble but I have posted the answer to the problem, Thanks.
You do not need to install SQL browser to simply connect to a remote database, it allows you to see SQL server instances on your machine.
In management studio, adding the hostname and credentials in the connection dialog box is enough and if they are correct, and you have access, it will connect.
really sorry for the trouble.
And the problem was a slash ( \ ).
I spent couple of hours trying to figure out what's wrong with the connection and all that time I used SERVER / INSTANCENAME and everything else was perfect... and suddenly when I was searching online someone had made a same mistake and I looked at my hostname and it was wrong.
It should be SERVER \ INSTANCENAME with a backslash ( \ ).

Can't connect to Windows Azure Database

I am trying to connect to a windows azure database through visual studio
Here are my steps :
I press add connection on the server explorer
fill in the server name .database.windows.net
Select Use SQL server Authentication
Fill in the username and password
Enter a database name
When I press Ok, I have to wait some time and then it gives and error 40: could not connect to sql server.
My Azure server is set to accept ip from (0.0.0.0 - 255.255.255.255) and so is the MicrosoftServices, can someone please help me with this? I'm really stuck, I've tried about everything I could think of :(
I was following this tutorial:
http://social.technet.microsoft.com/wiki/contents/articles/2151.windows-azure-and-sql-azure-tutorials-tutorial-2-using-sql-azure-en-us.aspx
Got stuck at step 7...
You need to be running SQL Server 2008 R2 (+ Service Packs) to connect via SSMS (SQL Server Mgmt Studio)
Does the location you're connection from block outbound traffic/connections on port 1433? This is actually a bit more common than folks realize. If you're 100% positive its not blocked, two things I'd recommend trying are a) remove and readd the rule b) put in a more specific rule using the IP you're actually coming from.
Please make sure the username is correct. You can also try to use the following format:
<login>#<server>
In addition, I would like to suggest you to check http://msdn.microsoft.com/en-us/library/windowsazure/ee336282.aspx for some general troubleshooting guidelines about connecting to SQL Azure.
Best Regards,
Ming Xu.

Creating a database through Server Explorer in Visual Studio 2010

So, I am using Visual Studio 2010 and was trying to create a new database that I could use in my project. I have vague idea of having used the Server Explorer in the past, although I'm not that sure about it. My experience with MSSQL is almost non-existent, anyway.
I don't remember having to configure anything, but it seems I have a server called Xyz already set up, as can be seen in the next picture:
I've tried to to create a new database, but I am getting the following error:
What might be wrong? What tools should I make sure are correctly running? Isn't there something like Oracle's Sql Developer which allows me easily to inspect what's happening with my databases?
Also, what about the authentication? I can't recall having configured anything when installing Visual Studio. Maybe I still have to configure something?
I'm quite lost here, I'd appreciate some light shed up on me on this issue. Thanks!
Sounds like you don't have a SQL server or you're lacking some permissions.
On the server go Start->Run and type in services.msc and look to see if you have the SQL Server process and it is running. Also verify it is not a named instance.
If you see "SQL Server (MSSQLSERVER)" it is a default instance and you should be able to reference it using the server name.
If you see "SQL Server (SomethingElse)" you have to reference it using servername\SomethingElse
You also need to verify you have named pipes enabled by running the SQL Server Configuration Manager -> SQL Server Network Configuration -> Client Protocols.
If the sql server is new, it is probably because named pipes isn't enabled.
Or it could be like Mrchief stated and you don't have permissions to access that server.
Actually I think you would get a permissions error if that was the case. Your error is specific to connecting to the sql box.
I had similar problem with the same set up.
This article helped: http://support.microsoft.com/kb/823938
It turns out that SQL Server 2008 is shipped with TSP/IP disabled by default and nobody can connect to it via network, even from localhost.
Here is the solution:
You can check in registry this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib\Tcp\Enabled
It must be set to 1 for SQL Server to be listening for network connection.
If it is set to 0, change it to 1 and restart SQLSERVER service.
Run this on master database to see error log on the server:
exec Go Xp_readerrorlog
You should look for
SQL server listening on X.X.X.X: Y
This will be an indicator if network connections are allowed in the Server

Resources