SqlErrorNumber=40532 Unable to login to Azure SQL DB​ (or connect linked service) - database

I keep getting the below error when im trying to create a linked service for my azure sql instance for a quick etl project. I have added my IP address to my firewall but i don't see a way to add a rule for port 1433.
This is how my firewall is currently setup:
[![enter image description here][1]][1]
Cannot connect to SQL Database. Please contact SQL server team for further support.
Server: 'server.database.windows.net', Database: 'Database1', User: 'email.onmicrosoft.com'.
Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
Cannot open server "acc.onmicrosoft.com" requested by the login. The login failed., SqlErrorNumber=40532,Class=20,State=1,
Activity ID: 861b100a-9ec6-46ae-929b-7f730319a741.
please help - I just want to connect to the SQL DB i created in my resource group (azure newbie)
[1]: https://i.stack.imgur.com/peig6.png

Related

#AzureDataFactory & linked services. SQL Server connection error

I am facing below error while connecting on premise SQL Server database in Azure Data Factory. I was establish a self hosted integration IR which running fine. Any one help on this please.
Cannot connect to SQL Database: '_&', Database: '', User: '________'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
Cannot open server '____&' requested by the login. Client with IP address '223.196.174.128' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect., SqlErrorNumber=40615,Class=14,State=1,
Activity ID: _____________.
Thanks in advance!
Client with IP address '223.196.174.128' is not allowed to access the server.
That's not an error you'll ever get from an On-Prem SQL Server. That error is coming from Azure SQL Database, and it means exactly what it says. Your client IP is not allowed to connect in the Server's Firewall.

Throwing this error message "Error -1 - SQL connection failed." when trying to connect SQL server from Microsoft Azure's Database Migration Services

We tried to do one poc which meets our upcoming requirement in my personal Laptop. The requirement is migrating the on premise sql database into azure sql database.
The screen shot of error is,
Connection error message and description
Below are steps which we have done.
Step1:
We have created a sql database in azure portal. The server name is like sundar64599.database.windows.net
The Screenshot is here, Sql database in azure poral
Stpe2:
Then We have done the assessments and created the migration project in Data Migration Assistant tool and we deployed it successfully.
Step 3:
Then we created a Database Migration Services and tried to create a migration project.
Here we entered the source server details to connect and it throws the error as mentioned added the screenshot above.
And also we tried the below to resolve this connect issue.
1. In sql server confuguration management,
a. We restarted the sql server and tried to connect. But it fails. The screenshot is Sql server restart
b. Then we had set the TCP port as 1433 and dynamic port as 50313 and tried to connect. But it fails. The Screenshot is, Tcp with dynamic port
c. Then we had set the TCP port as 1433 and dynamic port as empty and tried to connect. But it fails. The screenshot is, Tcp empty dynamic port
2. In Sql database of azure portal, we checked the client ip and added the exact ip and tried. Even it fails. The Screenshot is, Firewall ip settings
Please add your suggestions to resolve this connection issue.
Thanks in advance,
Samidurai Tamilmani
You need to provide the FQDN (Fully Qualified Domain Name) or Public IP of the source server as described here. The way you are providing the source server will work in the local network but not from outside, which is required by the Azure Migration services.
So make sure that your source server is available from the internet. You can have a look at the complete steps here - https://learn.microsoft.com/en-us/azure/dms/tutorial-sql-server-to-azure-sql

Default SQL Authentication Details for SQL EXPRESS 2016

I'm attempting to remotely connect to my SQL Express 2016 server through MS SQL on my local machine however am having extreme difficulties with the authentication.. Well I assume it is an authentication issue as when I attempt connect to connect to it I receive the error message:
The remote computer refused the network connection.
When connecting through the sqlcmd I am using Windows authentication and have no issue, however to connect to it remotely I need to use SQL authentication and have no memory of creating an account so am wondering if there's a default login and password?
I believe this is the issue however it is quite likely i'm doing something stupid so any assistance would be appreciated!
You can create an account that can be used to connect to that SQLExpress instance by using SQL Server Management Studio. Expand the database you wish to create a login for in the Object Explorer. Under the Security folder, you can create a new login by right clicking the Logins folder.
Also make sure that your machine has its firewall configured to allow remote connections, the server has remote connections enabled, and that you are allowing logins for Windows Auth and SQL Server Auth.
You can allow remote connections for a server by opening the SQL Server Configuration Manager. Under the SQL Server Network Confiuration Node, Select Protocols for MYSERVERNAME. Ensure that TCP/IP is enabled.
Here's a guide on setting up the firewall: https://technet.microsoft.com/en-us/library/ms175043(v=sql.110).aspx
You can enable SQL Server Authentication by right clicking your server name in the object explorer in SQL Server Management Studio and going to the Security tab. look for the "Server Authentication" option.

Unable to connect to Azure SQL Server. Getting an error "The Network path was not found"

I created an Azure SQL Server. I have set the firewall, added my IP address to the rules. I tried to log in using SQL Server Managment Studio but got the network error every time. I am using the Server Admin Login and password created while creating the SQL server. Are there any more steps required to log into the SQL Server?
Note: I also enabled port 1433 for inbound connections on my PC.
According to the error message, we should check the server name of the database.
We can select the database here, and SQL Server Managment Studio will type the server name automatically:
Another way, we can find the information via azure portal, then type the server name manually:
It seems you are using named pipes to connect to SQL database. What happens if you specify TCP/IP protocol in advanced properties tab?
Thanks Everyone for your inputs. The only issue was, the firewall was blocking the port 1433. After opening it, I could connect to the SQL Server hosted in Azure. The link below mentions the requirement to open the said port. https://learn.microsoft.com/en-us/azure/sql-database/sql-database-develop-direct-route-ports-adonet-v12

Connect to SQL Server database

I'm trying to connect to a SQL Server database at Discount asp.net hosting with SQL Server Management Studio. Here`s the connection string that is working fine. What parts of it should I use in Management Studio to connect to remote Db?
Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_709539;
User ID=SQL2008_709539_user;Password=password;
I'm filling the fields in the following way:
Server name: tcp:sql2k803.discountasp.net
login: SQL2008_709539_user
password: password
authentication type is SQL Server.
If it returns "Login failed" then you are getting to SQL Server but SQL Server is rejecting you (so it won't involve firewall, DNS, etc). Did you try explicitly setting the database information in the Connection dialog in SSMS? You may have to follow up with the host and ask them what state was found in the SQL Server log to go along with your failed attempt to log in. This is often because the database wasn't specified or the wrong database was specified.
Here is a list of all the states I've observed and what they probably mean, if your host won't directly tell you what to fix but they do tell you what state was found in SQL Server's log:
Troubleshooting Error 18456
Database: SQL2008_709539
Login: SQL2008_709539_user
Password: password
Host: sql2k803.discountasp.net
Please note also:
Some hosting companies denies access by default so you may have to request access from your IP address
Sometime I was unable to connect using host name, I used IP address to connect via Management Studio (such problem appear due firewall, proxy, etc)
ADDED:
Also see whether you've enabled remote tcp/ip connections
If it's working fine, use tcp:sql2k803.discountasp.net as server address, and user / pass as login data

Resources