I'm using a logic app to pull tweets from the native Twitter connector, score the sentiment of the tweet, and then store the result in a table within an Azure SQL Server database. The first two steps work fine, but setting up the connection to the SQL Server is giving me trouble. When I set up the connection, I give it a name and then select the database I want from the available ones shown in my Azure subscription, then provide the username and password. After hitting create it asks for a table name - I click the dropdown and it says "Loading" for a while, then shows this:
"Could not retrieve values. BadGateway"
I can't seem to find any details on this error message in the Microsoft docs, is there any way to resolve this?
Make sure your database server is allowing access to azure services in the firewall. https://learn.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure
Related
I have recently started receiving "Can not connect to the database in its current state." when trying to connect to my Azure SQL database. As far as I am aware nothing has changed and I get the same error using the query tool in the Azure portal itself using etiher sql authentication or Azure Ad authentication.
The server status is "online" and the trouble-shooter says that it can not find any issues. I have a limit on the billing of the account but have not hit it.
I cant find any way of "restarting" the sql instance or any logs that indicate what might be wrong. I cant raise a support ticket as the troubleshooter suggests that nothing is wrong.
Does anyone have any insight as to what might cause this or what I might try to get it resovled?
Edit: I believe that this is an error code for a Billing issue now - despite the billing appearing fine the subscription is disabled. All of the help articles indicated that code changes were needed to connect reliably but I dont think that is the case.
thanks in advance.
Are you using Key Vault with Azure SQL Database? Make sure permissions to the key vault are properly set.
Another possible reason is the database may be in recovery state. In that case you may have to create a support ticket here.
I've been trying to return resources that are not compliant with my built in Policy of having an Azure Active Directory administrator provisioned for SQL servers (https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F1f314764-cb73-4fc9-b863-8eca98ac36e9).
The goal is whenever there is a SQL deployment that is not associated with an Azure Active Directory Admin, an alert should be sent by email. But I been unable to write the correct Log Analytics query to actually return NON COMPLIANTS. I am very confused on what exactly the property "isComplianceCheck" means because it is false for all resources even ones that are compliant with the policy. I've looked at blogs https://mohitgoyal.co/2019/10/11/using-azure-log-analytics-alerts-for-non-compliant-azure-resources/ and https://techcommunity.microsoft.com/t5/itops-talk-blog/how-to-create-azure-monitor-alerts-for-non-compliant-azure/ba-p/713466 neither of them have the correct, up to date syntax. So what is the correct query syntax to return NON COMPLIANTS?
Other Questions: Tips for organizing the Activity Log? I got 20+ entries from a single SQL deployment and it is very hard to sort through what is what.
so currently I am doing a connection from Azure IoT Hub - Data Stream Analytic - SQL Database. and when I wanted to test the output connection that I have declared in Stream Analytics Job, suddenly error popped-up "Querying SQL Database returned an error: Login failed for user 'Free Trial"enter image description here. Please help me I already checked the firewall and everything is okay.
Thanks! :)
Please go to Azure Portal, search for Azure SQL Database (https://portal.azure.com/#blade/HubsExtension/Resources/resourceType/Microsoft.Sql%2Fservers%2Fdatabases), make a click on your database. On the subscription column to your right hand you may read a hyperlink with a text like "(Disabled) Free Trial". If you click on that text, you may get a description like "This account is on a deprecated billing system. Ask the Account Admin, #, to contact Support to move it to the new system.".
Please update your credit card information (validate it) or upgrade your subscription to pay-as-you-go or another type of subscription.
I've received the error "connection is busy with results for another command" - when adding a record via an Access DB connected to a SQL Azure DB. Searching this error didn't turn up anything relevant, but I figured out that this was caused by a key violation on the table. It would appear that a useable error message is not being passed back from Azure to Access. Can anyone suggest how to handle this situation (other than querying the table in advance) - i.e., get an appropriate error description from Azure?
Summary
I am using SQL Server Reporting Services on Azure. I want to dynamically specify the connection string including the credentials at runtime. I run the reports by embedding a ReportViewer control in an ASPX page.
I can make this work on premise with SSRS 2012 as long as I specify an Execution Account on the SSRS. However, on Azure Reporting Services I can't specify an Execution Account so it doesn't work.
My question is - how do I make this work on Azure? Specifically, how do I specify the database connection string including credentials at runtime when using Azure Reporting Services rather than on-premise.
Details
When you do this on-premise, these are the key steps;
Set your report to use an embedded connection.
Define a parameter, say "ConnectionString"
In your embedded data source, set the Connection string to "[#ConnectionString]" (you can also use the expression builder to construct a connection string from different params but it's the same difference).
In your embedded data source set Credentials to "Do not use credentials".
Make sure you have specified an Execution Account on SSRS
In your ASPX page, do something like this.ReportViewer1.ServerReport.SetParameters(new ReportParameter("ConnectionString", connectionString, false));
On SSRS on Azure, you cannot specify an Execution Account so therefore the above doesn't work.
In essence, if you try to set "Do not use credentials" and you do not have an Execution Account specified, you will get this error:
The current action cannot be completed. The user data source credentials do not meet the requirements. Either the user data source credentials are not stored in the report server database, or the user data source is configured not to require credentials but the unattended execution account is not specified. Tracing ID is: XXX. Machine name is XXX. (rsInvalidDataSourceCredentialSetting)
What I have tried
I have tried quite a few different things so far, including specifying dummy credentials in the embedded data source. The only way I can make this work with Azure is if I specify valid database credentials directly in the embedded data source.
I have also seen some advice around trying to use the "SQL Server" type connection string instead of "Azure SQL" but it doesn't seem to make any different locally and, in any case, I can't deploy to Azure unless I set it to Azure SQL. I have also experiemented with this.ReportViewer1.ServerReport.SetDataSourceCredentials but that doesn't seem to help either; When stepping through the code I get the error the first time I try to communicate with the report, even if that communication is the call to try to set the credentials.
What I find most frustrating about this is that it seems like an entirely illogical dependency; The database credentials you specify in the embedded data source cannot be used to actually run the report (as they are just SQL credentials) and the Execution Account is a Windows account that cannot access the database. So, it looks like an entirely arbitrary dependency for no practical reason whatsoever.
You can use this solution if you are able to create a general purpose "ReportUser" windows account on your server and give this account viewer access to your reports.
You can get around this by adding two parameters to your report.
1. #DatabaseServerName
2. #DatabaseName
Then in your report data source set the connection expression to:
="Data Source="+Parameters!DatabaseServerName.Value+";Initial Catalog="&Parameters!DatabaseName.Value
When developing the reports you should add a TEST data source to the report that points to a valid development endpoint then prior to deployment to your production server set all the datasets to point back to the data source using the expression above.
In order for this to work you will need to create a "ReportUser" account on your production server and set the credentials of your dynamic data source to the username and password of this account.