Hi I am new to azure sql I have created a server and sQL database on portal , Now I am accessting it from same machine previously it was not accessible but when I add my client IP in firewall rule it allows me to access but the IPV4 Address comes automatically from that machine into the textbox , now I want to give access to another machine I have tried to add its IPV4 address using IPCONFIG but it says network instance specific error occured while establishig the connection I have put IPV4 from ipconfig command might be my IP getting method is wrong can some one assits
Loading
Vishal YelvePosted Apr 17, 2023, 6:06 AM
Hi Mark,
Do refer my article
https://www.c-sharpcorner.com/article/creating-an-azure-sql-database/
Mark TaborPosted Apr 16, 2023, 11:38 AM
this is the error
TITLE: Connect to Server
------------------------------
Cannot connect to nsftdb1.database.windows.net.
------------------------------
ADDITIONAL INFORMATION:
The server principal "DEV_ADMIN" is not able to access the database "master" under the current security context.
Cannot open user default database. Login failed.
Login failed for user 'DEV_ADMIN'. (Microsoft SQL Server, Error: 916)
Tuhin PaulPosted Apr 16, 2023, 9:44 AM
See the firewall rules for your SQL server are set up to allow access from the IP address of the machine you are trying to access the database from. You can check this by going to the "Firewalls and virtual networks" tab in the Azure portal and verifying that the IP address is listed in the allowed IP addresses.
Check the connection string you are using to connect to the database is correct. You can find the connection string in the Azure portal under the "Connection strings" tab for your SQL database. Double-check that the username and password are correct and that the server name and database name are spelled correctly. If you are still having issues, try connecting to the database from a different machine to see if the issue is specific to the original machine. If you are able to connect from the new machine, then there may be a network issue on the original machine that is preventing it from connecting.
Mark TaborPosted Apr 16, 2023, 9:38 AM
Naimish Makwana can you read my below recent reply.
Mark TaborPosted Apr 16, 2023, 9:35 AM
Tuhin Paul I have added my IPV4 address like 192.168 .... but when I tried to login it open up another widnow in ssms mentioning the IPV4 address of actual machine by which I create instance of sql server on azure, then it ask me to enter myazure credentials (WHICH I DO NOT WANT ) like if I want to give access to my DB to someone then I will not want to give him the access to azure portal , right now I have enter the azure portal detail on other machine like email and password and i am able to access the db from this other machine, the strange thing is that I have deleted that client IP from azure portal but still I am able to login from this other machine to which I gave azure credental when popup comes
Naimish MakwanaPosted Apr 16, 2023, 9:32 AM
To allow access to your Azure SQL Database from another machine, you need to add the IP address of that machine to the firewall rule for your server.
To add a new IP address to the firewall rule, follow these steps:
If you are still facing connection issues, make sure that the other machine is connected to the internet and has the necessary network permissions to connect to the Azure SQL Database. You can also try disabling any firewall or antivirus software on the other machine temporarily to see if that resolves the issue.
Additionally, you can also check the error message you received when attempting to connect to your Azure SQL Database from the other machine. It may provide some clues as to what the issue might be.
Tuhin PaulPosted Apr 16, 2023, 9:28 AM
1. Check if the other machine can ping the Azure SQL Server. Open a command prompt on the other machine and type "ping.database.windows.net". If the ping is successful, it means there is network connectivity between the machines. 2. Make sure the firewall on the other machine is not blocking outbound connections to the Azure SQL Server.
3. Check if the SQL Server is configured to allow connections from the other machine. You can do this by logging in to the SQL Server using the SQL Server Management Studio and checking the server properties and security settings.
Tuhin PaulPosted Apr 16, 2023, 9:27 AM
To give access to another machine, you need to add its IP address to the firewall rule of the Azure SQL Server.