I have a server and a database on Azure and I connected it to SQL Server Management Studio 2017. I want to allow remote connection to my server but I can't get into the "server properties". I'm on free trial on Azure, and the firewall is on with "allow access to Azure services" with my IP on the whitelist.
On right click, the "properties" option doesn't appear
This option is for SQL Server instance not for Azure SQL Database instance.
Azure SQL Database instance is remote database in cloud, you don't need to set it since you have set the special firewall.
If you don't create the firewall rule, you can not connect to the Azure SQL DB.
The Azure document said that: A firewall rule is required to connect from other Azure resources and from on-premises resources.
Reference: Server-level IP firewall rules.
We can think that set firewall rule is equivalent to set SQL Server remote connection.
Hope this helps.
Related
I have my api running on Azure and it is working perfect if it is connected to Azure SQL database.
I want this api to use my local database i.e on-premises database. I made my database to accept connection from remote and also enabled TCP/IP in wf.msc and also created an inbound rule for 1433. Is there anything i had to do to make this work? I tried to use the following connection string in azure :
ASP.Net core 2.0 web api written in C# hosted on azure and trying to access the sqlserver database on the Virtual Machine.
I tried as mentioned in the following to create hybrid connection but the status keeps saying 'Not Connected'
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections
Server=tcp:<mycomputername>,1433;Initial Catalog=MyDb;Persist Security Info=False;User ID=userid;Password=pwd;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
If your On-Prem SQL VM is behind firewall, you need to allow inbound from Azure. Usually you poke a hole in your On-Prem firewall and allow inbound from your Azure (source) to your On-Prem SQL server (Destination) on a particular port.
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!
I cannot connect to either my SQL Server instance hosted on an Azure VM or my Azure SQL Server Database using on-premise Power Query or Power BI Desktop. I CAN connect using the Excel DATA ribbon or PowerPivot but, using the same server name and credentials, cannot connect using Power Query.
I have tried the following, none of which solved my problem:
Added Inbound TCP rule for port 1433 to Azure VM
Added Outbound TCP rule for port 1433 to local machine
Ensured that my Azure SQL Server Database allows Windows Azure
Services
Ensured that my Azure SQL Server Database allows all relevant IP
addresses
Tried both DNS and IP address as server names
Used IP address, Port as server name
Ensured that the Azure SQL Server VM SQL credentials have full admin
rights
Connect to SQL Server VM from Power BI Desktop downloaded onto the
same VM
Not sure what else to try. How is it that I am able to connect through PowerPivot but not Power Query or Power BI?
I get the following error after I enter server name and credentials and hit connect: "The user was not authorised"
What am I missing?
It sounds you are actually logging in OK, but on connection Power Query / Power BI is doing something your user is not allowed to do. Most likely it is when Power Query scans the schema of the target server for tables, views and TVFs.
From my understanding the main difference/improvement with PQ over PP & Excel Get Data is being able to call TVFs, so I would look at your permissions in that area.
Test #1 would be to make the PQ connection as a SQL sysadmin user to confirm my suspicion (i.e. PQ will work OK).
I have an SQL Server 2012 instance installed on a Windows Server 2008 R2.
I configured SQL Server for remote access.
I need to access the SQL Server from a machine which is not on the same domain as the SQL Server instance using JDBC. I get the following error
Login failed. The login is from an untrusted domain and cannot be used
with Windows authentication.
I simply need the ability to access the SQL Server from various machines which will not (and never) be part of the same domain as the sql server instance.
Solutions appreciated.
This is a broad question since there are so many factors that can prevent access to your SQL Server. Here are some general tips:
Enable access to certain protocols (TCP/IP, Named Pipes, etc.) via SQL Server Configuration Manager on the db server.
Enable access to port 1433 (the port used by SQL Server) on the db server via Windows Firewall and any network-level firewalls.
If using a Windows user to log in to the SQL Server then make sure this user (or one of the groups to which it belongs) is mapped to a SQL Server login.
I have installed SQL Server 2005, the SQL Server instance name is SOSO, the machine name is HERO, I tried to connect from another computer using SQL Server Management Studio:
Server name: HERO\SOSO
Authentication: Windows Authentication
But I didn't succeed.
SQL Server is enabled to be connected remotely.
So what is the problem?
Windows Authentication uses the Active directory user from the connecting machine to authenticate with the database. Does it have the right permissions to access the database? Maybe try authenticating with a SQL Server database user first. Maybe you've created a SA user on installation, try connecting with that.
But as the other replies also tell, first check network / firewall connection and please provide us with the error message.