Not able to access Azure SQL Server - Login failed - sql-server

I am not able to connect to Azure sql server from my machine, I have added my public IP and azure sql server is configured for remote access but I am getting error
Cannot connect to your Azure SQL DB logical server/Azure SQL MI server, exception: Cannot open server "SERVER NAME" requested
by the login. The login failed.
Note: I am able to connect to Azure SQL database from Azure portal.

If that's the case, you should try to download Azure Data Studio and log in with your Microsoft account that you used for Azure.
May I ask you to add in a screenshot of your login detail (you can just fake the login but the syntax must be the same) so that the community is able to understand the situation better :D

Related

Getting SQL login failed error (18456) when connecting to Azure SQL

I am trying to connect to an Azure SQL database using SSMS. I know the credentials are correct but I keep getting the error message
Login failed for user xxxxxx
I am using SQL Server authentication and I have already added my client IP address to the server in Azure.
The error is an SQL server error, so your login request is reaching the database. It is therefore not a network problem.
There is therefore something wrong with the user account or related configuration. Things it could be:
SQL Server account authentication is not turned on (Only AD authentication by default)
The user is configured with a default database, that he does not have access to

Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12

I have a SQL database created and I am trying to deploy/move that database to the Azure Cloud by using the Deploy Database to SQL Azure Wizard in SQL Server Management Studio. But I have ran into an error after trying to deploy it. I am using the SQL Authentication to log in with my credentials. I also tried installing the Data Migration Application.
The error is:
TITLE: Microsoft SQL Server Management Studio
One or more unsupported elements were found in the schema used as part of a data package.
Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12.
(Microsoft.SqlServer.Dac)
BUTTONS:
OK
I don't understand what this error means and also I don't understand why this error is happening. I looked on the internet for possible solutions but could not find any information. Please help me.
SQL Azure and regular SQL Server aren't entirely compatible.
One of the things that is enabled on regular SQL Server is the guest login. This login allows connection to instance, with a default database of master. Once connected, the user can switch to a different database (use [thedatabase]) if they have the authority to do so.
But in SQL Azure, you connect directly to a single database, and can't switch databases on the connection. So the guest account has no function.
On your source instance (the one you want to migrate), you can revoke this ability so that the wizard won't try to migrate it. Execute revoke connect from guest on your on premise instance.

Connection issues when trying to connect to a SQL Server database

I'm trying to connect to a remote SQL Server database. It's being hosted on another server within the network at my workplace, but I keep getting an error when trying to connect while being logged in under a specific Windows (AD) account.
I'm using SQL Server Management Studio from my local server. I tried logging in with account "x". When specifying the connection string I'm using a SQL Server authenticated user. This is when I get the error below:
I logged in with a different account "y" to the server and attempted the database connection again (with the same SQL Server authenticated user), and it worked.
Why would I be able to connect under one Windows account and not the other (from the same server) when I'm trying to connect with a SQL Server authenticated user?
Could this be that the Windows account is not part of the correct administrator group?
Any thoughts or insights are appreciated.
Thank you,

Error 18456 loggin on a SQL Server 2016

I had an unexpected system crash and had to setup SQL Server 2016 again. I can connect to the server from SSMS if I use a Windows authentication account, but not via any login created. I keep getting an error 18456:
Login failed for user 'sa'
Steps:
I have enabled SA login and gave it a password but cannot connect via SSMS
I have created another login and matched it to my project database, the project database now has the login under its users but again, I cannot log in.
SSMS is installed on the actual db server so I doubt this is a remote login issue, but as the db server is isolated from the actual site I would like to update this if needed.
Any ideas would greatly be appreciated!
Did you enable the mixed mode authentication?
Did you restart SQL services after changing the mixed mode authentication?
Some of the server level properties takes only after a SQL restart , one such is authentication modes.
Usually a SQL Service problem.
Start - > View Local Services -> SQL Server(SQLEXPRESS) > restart it

Attempt to migrate SQL Server database to Azure fails with login failed

In SSMS, I'm trying to use the "Deploy Database to SQL Azure Database" utility.
I'm moving a small local database in SQL Server 2012 to Azure for hosting. But after entering the host database server connection parameters I always get a "Login Failed for user,...." error, referencing the name of the local database to be created on the server.
Why this would fail is unclear, since the database does not exist on the cloud server yet. Here is what I have done:
Set up a firewall exception for my local IP address.
Confirmed my server administrator user name and password
So now I am left guessing... Locally I use Windows Authentication. If a database is to be moved to the server, does it have to have SQL Server authentication, as is required on Azure host?
You need to have the SQL server Authentication enabled in order to be able to login to your database when you move it to Azure.
Once, you login through SQL server authentication, you can create your users then and have different logins for different users.
Hope this helps!

Resources