I'm having problems authenticating against dbs on azure. All the details are right but when I click connect I get the following error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Error connecting to 'tcp:xyz.database.windows.net,1433'.
------------------------------
ADDITIONAL INFORMATION:
Failed to connect to server tcp:xyz.database.windows.net,1433. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
One or more errors occurred. (mscorlib)
------------------------------
One or more errors occurred. (mscorlib)
------------------------------
Failed to parse XML blob.
Reason: XML document must have a top level element.
Line: 0, Position: 0
Text: (null) (System.Data)
I already uninstalled everything related to SQL and SQL Management Studio and still no luck. I tried connecting with my account in other machine and works, so it seems is something on my machine.
Any suggestions?
UPDATE:
I tested another user on my machine and does work, so it must be something with my user on my machine!
Leaving this here as this SO article is the top result for "SSMS Failed to parse xml blob".
I got this error when I was capturing traffic with Fiddler 4 AND running SSMS at the same time. If you are running Fiddler 4, please close it and try again!
today I experienced the same error message and did a lot of trouble shooting. It turned out to be such a simple fix - my PC requires me to use the new password to log in after I changed it two weeks ago (it says the old password was expired). After I re-logged in, connected to VPN, then I got access back!
Ok after multiple attempts to sort this out, I finally got it fixed.
Follows the steps that worked for me:
Uninstall SQL and SQL Managment Studio
Delete SQL folders from Program Files
Open "regedit" and delete following entries:
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server 2012 Redist
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server 2017 Redist
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Native Client 11.0
Install CCleaner and run registry clean
Restart PC
Install SQL Managment Studio
I was facing this tonight. The connection worked while I was at the office but was failing when connected via the work VPN. I thought I'd have to go into the office. One of my teammates suggested I check and make sure my IP connectivity, and especially DNS, was set to automatic.
I disconnected from the VPN
Set IP & DNS to Automatic
Reconnected VPN
Connected to Azure SQL via SSMS successfully
I hope this helps someone else.
Related
This started happening to me in the past week or so. I've searched the web and tried various suggested solutions, nothing has worked so far. I didn't change my password during this time period. I tried rebooting my laptop, reconnecting to the network (VPN), running ipconfig /release & ipconfig /renew, all to no avail.
I have no problem connecting to the SQL server database running on my local machine, it's when I try to connect to a database running on a network server that this issue comes up. Outside of VS, I can connect to the network database from Management Studio without any issue.
In SQL Server Object Explorer, I tried to add a new SQL Server (my local database server appears in the list), I got the error message "The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server)"
Any helpful insight would be greatly appreciated.
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.
The title pretty much says it all, however let me tell you what I have researched.
I have verified that the following services ARE running ...
SQL Server (SQLEXPRESS)
SQL Server Browser
SQL Server VSS Writer
(I don't really know what this one does)
This one however will not start ... For some reason it starts then automatically turns off.
SQL Server Agent (SQLEXPRESS)
When I try to connect using my server_name\instance and Windows Authentication 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: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server)"
The connection specified in the "Connect to Server" box was working perfectly fine before I upgraded. I thought it might have been my Norton 360 Premier but I uninstalled it and it didn't help. I AM having issues with the adapter frequently dropping the internet connection but I just disconnect and reconnect and that resolves itself ... perhaps it's related?
The other technique I tried was to replace the server name with the IP address ... 192.168.0.22\Instance ... This actually seemed to find the SQL Server but rejected the Windows Authentication ...
"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
Any help getting this up and running would be greatly appreciated. I have several databases on here and would hate to have to reinstall SQL Server and manually hook them back up .. or worse lose any of them. I have a client waiting so ... the sooner I get help the MORE appreciative I'll be!!
Sincerely,
G
UPDATE
I have access! But I am not sure what I did that made the difference.
Open SQL Server Configuration Manager.
Expand SQL Native Client 11.0 Configuration (32-bit)
Select "Aliases"
Choose alias name ".\SQLEXPRESS"
Change alias name to "192.168.0.2\SQLEXPRESS" (using your IP address)
Change the value of "Server" to 192.168.0.2\SQLEXPRESS (using your IP address)
This allowed me to log on to the server using the ".\SQLEXPRESS" alias.
Some things I do NOT understand however is ...
I changed the "alias name" expecting that to appear in my list of connections drop down in SQL Management Studio. It did not, but the alias "'\SQLEXPRESS" was still there and worked!
For the alias "SERVER\SQLEXPRESS" I changed the "Server" value to use the IP address as well but received the authentication error described earlier, even though the only difference was the Alias Name.
I have a problem to login to SQL Server 2014 Express edition using a SQL Server user.
I have this problem in Windows Server 2012. In normal Windows machine I can create user and login. I changed the authentication mode to mix and did the all thing in Internet but still I got login error.
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
If anyone can please help me.
How are you trying to connect? Is there any connection string? And Do you check connectting with udl file.
For testing with udl file follow below:
Create a new txt file.
Change its extension to udl.
Run it.
Select Microsoft OLE DB Provider for SQL Server in Provider tab.
Enter your entries.
Service of SQL Server (MSSQLSERVER) must be started in your services.
If udl file works, I think you need to reinstall SQL Server. [from comment]
I found the problem. It was conflict with previous installation instant. After I remove everything and reinstall SQL again make it work.
I have installed Sql Express 2012 version. I installed Local Db separately. i can see its installed when I click on "Installed Sql Server discovery report". However, I cannot connect to it using Sql Server Management Studio or Microsoft Visual Studio 2012 Professional Edition. I get the error:
"The attempt to attach to the database failed with the following
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: 50 - Local Database Runtime
error occurred. Cannot create an automatic instance. See the Windows
Application event log for error details."
In Windows Event viewer I see several of following errors with different regsistry keys each time:
"The DataDirectory registry value is missing in the LocalDb instance registry key:{-----}"
I checked in regsitry values for local db in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftSQL Server Local DB and there's only one entry "Installed Version".
I have gone through several posts which state solution for the above error and have done almost everything they have suggested but still can't get localDb to work.
I'd appreciate any help that one can provide in order to solve this issue.
UPDATE:
Using Command Line Interface I verified that localDb v11.0 is installed. However, the command sqlLocalDb info v11.0 gives error:"The automatic instance "v11.0" is not created. If I try to create one it gives another error:"Unexpected error occured inside a localDb instance API method call."
You may try to use SQL Server Authentication. Also make sure that your SQL service is running.
Also you may try to delete the following registry:
HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances\[GUID_FROM_EVENT_LOG]
You may also check Getting Started with SQL Server 2012 Express LocalDB
You need to start the SQL service for the local system.
Start Button
Write "SQL Server Configuration Manager" and click on it
After opening "SQL Server Configuration Manager" you need to start the local system services which are may be stopped in it that why your local Database not connected.
After starting local services you just connect the local system database. It should connected successfully.