Azure SQL DB: Check if "Allow azure services to access server" is enabled after DB created - sql

In working towards setting up ADF for SSIS access to my Azure DB, I need to check that the "Allow azure services to access server" is enabled. The database has however already been created and I cannot find any obvious links in Azure portal as to where I can find this setting now.
As example of what I'm looking for. refer https://www.purplefrogsystems.com/paul/2018/01/azure-ssis-how-to-setup-deploy-execute-schedule-packages/

If I understand it right, you could follow my steps to find the setting.
1.open your Azure Sql Database on azure portal,then go to Set server firewall.
2.check the Allow access to Azure services setting.

Related

How to configure Azure AD in SQL Server for authentication?

We need to configure Azure SQL server with Azure AD such that while connecting to Azure SQL server through JDBC our users should be able to use their AD username and password.
We are unable to find documentations on how to setup Azure AD with Azure SQL server.
We are looking for some documentation or some steps to configure Azure AD with Azure SQL server.
Firstly, while creating the Azure SQL Server, you need to make sure to choose Use only Azure Active Directory (Azure AD) Authentication in Authentication method option.
The JDBC driver allows you to specify your Azure Active Directory
credentials in the JDBC connection string to connect to Azure SQL
Database.
To know how to configure Azure Active Directory authentication visit Microsoft official document Connecting to SQL Database By Using Azure Active Directory Authentication.
To connect the Azure SQL Database with Azure AD through JDBC, there is a proper setup required in which you need to install and configure some prerequisites. This official document from Microsoft will guide you to do same.

Azure App Services cannot connect to Azure SQL Database

I have an API published to Azure App Services, using ef core, connect to Azure SQL database. below are the steps and the problem:
The Azure SQL database is up and running OK, I setup two firewall rules, one for my local dev ip, one for Azure App. I can connect to Azure SQL from local without any issue, and I have done the migrations.
I copied the connection string from Azure SQL and put in the appsettings.json, running the API from my local and connect to Azure SQL without any issue.
I published my API to Azure App services without any issues, I can see my app running OK since it has static file.
Then I went to Azure App Services => Settings/Configuration => Connection strings, create one new connect string with the same key/value as I used in the appsettings.json, based on the document from Microsoft: https://learn.microsoft.com/en-us/azure/app-service/containers/configure-language-dotnetcore#access-environment-variables
But the problem is after I done these, my API still not working, the api call to SQL return error 500.
Anything I missed or did wrong?
Thanks!
Thanks for the comments CSharpRocks, I did by adding the client ip, but I figured that's not the right way, so resolved by set the "Allow Azure services and resources to access this server" to True, that works.
For Others looking for the answer I had followed the steps above and it still did not work for me. But when I went to Visual Studios --> Publish --> Service Dependency's --> Add Azure SQL Database That fixed it for me.

How to view data on the Azure SQL database

I created a default ASP.NET web form web site using Visual Studio. By default it contains a .mdf database file, Registration page, Login page and some other pages. Then I host this web application on Azure as a web app.
After that I did several registrations for the web site and I need to see the data (data which i used on registration) on the hosted application.
Is there any way to connect to the database file in Azure? In Azure, I did not set up a connection string. I just publish the app and it manages the database connection itself.
There is nothing inside the "Database" section
It seems that you do not publish your asp.net to Azure with Sql Database correctly. So, you could refer to this article to check if you have deploy database correctly.
As you have published, you could go to the database on Azure portal and choose query editor(preview). Click Login and enter the username and password you have set in Azure Sql server.
Also, you could open Microsoft SQL Server Management Studio to get your database. And you also need to login into the Sql Server as above.
After logining into the sql database, you will see all the data you have insert.
BTY, make sure you have synced the data in local database to Azure Sql Database. For more details, you could refer to this article.

Azure SQL PaaS - Limitations

We are trying to evaluate possibility of migrating our in-house SQL DB server to Azure SQL as a PaaS.
Our legacy windows application which is written in VB6 and now running on VB.NET Framework 4.5
Clarifications I need if I migrate only DB server to Azure:
We use both trusted / credential based SQL connection from our desktop application to connect to SQL DB. If we migrate to Azure SQL, will it support trusted connection which should authenticate current organizations NT user?
We have lot of cross DB queries, do we need to face any challenge to use the queries as it is?
Run time we take a DB backup / restore for some business cases. Does this work?
Are there any restrictions on number of admin users on Azure DB?
Probably yes if you sync your local AD with an AAD (See: Use Azure Active Directory Authentication for authentication with SQL Database, Managed Instance, or SQL Data Warehouse)
Azure SQL Database (PaaS) doesn't support cross DB queries by default - you have to setup / use Elastic Query for that.
Yes, you can take a DB backup at runtime and also restore it. There is also a point-in-time restore feature available. See: Learn about automatic SQL Database backups.
I think you can only specify one server administrator (at least within the portal) but I doubt you will reach any limit on db users.
Instead of using the single database SQL Server PaaS service you should also consider using Managed Instance (preview)
You will have to extend your active directory to Azure active directory to keep using trusted connections. You will learn how to do it on this documentation and this one.
On Azure SQL Database you have elastic queries that allow you to run cross database queries. Learn how to create elastic queries here.
You can create bacpacs (export your databases) to Azure Storage or to on-premises location very easy.
You can configure one Server Admin or one Azure Active Directory Admin (it can be a group) for your Azure SQL Server. However, at the database level you can add many database users to the dbmanager role. You can have more information about this topic here.

web role access sql azure in same data center

I published my web role in windows azure which is accessing a SQL azure in same data center. According to Microsoft, above model should be called "Code Near Connectivity" and the connection between web role and SQL azure will not over internet but internally. See details at page http://programming4.us/database/1078.aspx#HPXtedlpJh3o1l1H.99
I wonder the Code-Near-Connection will be auto made by windows azure or anything needed to be applied first to make it happen.
It is automatic as long as you have selected to deployment of your code and sql db in the same region.