I have a task where I need to use ARM template to "setup SQL server with elastic pool and 2 databases (imported from bacpac files) use Microsoft Adventureworks samples."
Most of the template I made using "101-sql-elastic-pool-create" template that is available here: https://github.com/Azure/azure-quickstart-templates/tree/master/101-sql-elastic-pool-create
I used it for the elastic pool setup and used a sample from this documentation (https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac) to have the .bacpac imported to the database
But when I try to deploy this template (the template is available to see here: https://github.com/KarlisAG/SQL_ARM/blob/main/azuredeploy.json ) it throws me an error
("Resource Microsoft.Sql/servers/elasticPools 'task4sql/elasticp' failed with message '{ "code": "BadRequest", "message": "An error occurred while processing this request.", "target": null, "details": [], "innererror": [] }' ")
So, the biggest problem is (besides me being an absolute newbie) not knowing what I need to fix, because there is no additional information granted, besides the "BadRequest". For deployment I used two different methods: 1) the automatically generated one from VS when created Azure resource groups, 2) One shown in this documentation, with few of my own changes, so it could work for me ( https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac#deploy-the-template ), from where I also got the code part for importing .bacpac to my newly created database. [Both of the are available at the same repository, named "Deploy-AzureResourceGroups.ps1" and "DeployScript.ps1" respectively].
Both of the methods return the same error.
I even manually created these things in Azure portal to see what their template looks like and maybe copy some things that are not present in my template, but from what I saw I have exactly what they automatically generate.
And when I checked the deployment status in Azure portal I can also see that during the elastic pool creation it fails: screenshot from that section available here
So does anyone know how should I have created this type of template, or did I recreate it poorly, or am I missing some small mistake that keeps blocking me?
So after multiple tries it seems that I finally figured out what I was doing wrong. I am still not sure which of the changes made a difference, besides the last one, so I will write what I changed, so other people who could be facing similar issue know what they could do fix the issue.
At first, after #stringfellow noted, I thought that Free Trial is restricting me from doing anything, but after I lowered my DTU multiple times, to the point where it was at 5 (starting from 100), the same issue persisted, so probably it was not the issue (later on I had to change it at minimum to 50). I also changed the Elastic Pool edition from Standard to Basic. But doing these changes still didn't fix the issue.
At last, after answering #NachoMartínez-Aedo comment about the api version, it got me thinking. Because in the code that I posted I used "2020-08-01-preview" api version, but in reality I used "2014-04-01-preview", because when I changed the api version of all my parts to the 2020 one, then powershell told me that (No registered resource provider found for location 'northeurope' and API version '2020-08-01-preview' for type 'servers/databases/extensions'. The supported api-versions are '2014-01-01, 2014-04-01, 2014-04-01-preview'.). And after reading through that again and remembering that when I was looking at some documentation and Azure portals automatically generated templates I knew that I always say them using the 2020 api, not the 2014, which left me confused as to why I couldn't also use the newest version. And reading that error again I saw, that it specifically told that 2020 api version was not supported for the type "servers/databases/extensions", not that all of the parts must be in 2014 version (which is what I thought when I saw that error), so I tried and changed all the 2014 back to 2020 and left the extension api back at 2014 (previously I thought that all api versions should be the same, not sure why, maybe because most of the examples and documentation had everything have the same api version) and the everything worked, even the import part, about which I was worried.
So in the future I am not too sure if there is a better/newer way to import .bacpac file to newly created database with ARM, or just have to leave it as is and in the future use this same approach. Does anyone know?
I got the import extension from here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac
, where they use examples with 2014 api for the extension, so because of that I tried to use it for all my parts, but only during this answer writing did I realize and look through it again, that they used the 2014 api only for the extension part and not other parts, like server, database, etc.
TL;DR
So basically I needed to use the '2020-08-01-preview' api for everything besides from the extension part, where the newest api version is only '2014-04-01-preview'
I was able to deploy most of your template and use similar parameters in my own subscription. I saw in your screen capture that you are using a Free Trial subscription. I am curious if that has anything to do with the 'BadRequest' due to any sort of DTU limitation.
Here is my deployment, which failed as expected when it tried to import the databases.
Related
I'm creating a V2 Function App and want to use Swagger/Open API for docs, however it is not yet supported in the Azure Portal for V2 Functions.
Any suggestions on how I can use Swagger with V2 Functions in VSTS to create the docs on each build?
TL;DR - Use the NuGet package to render Open API document and Swagger UI through Azure Functions.
UPDATE (2021-06-04)
Microsoft recently announced the OpenAPI support on Azure Functions during the //Build event.
The Aliencube extension has now been archived and no longer supported. Please use this official extension.
As of today, it's in preview. Although it's in preview, it has more features than the Aliencube one.
Acknowledgement 2: I am still maintaining the official one.
Microsoft hasn’t officially started supporting Open API (or Swagger) yet. But there is a community-driven NuGet package currently available:
Nuget > Aliencube.AzureFunctions.Extensions.OpenApi
And here’s the blog post for it:
Introducing Swagger UI on Azure Functions
Basically its usage is similar to Swashbuckle — using decorators. And it supports both Azure Functions V1 and V2.
Acknowledgement 1: I am the owner of the NuGet package.
For anyone looking into this, Microsoft still hasn't added Open API support for Azure Functions +v2 and there hasn't been any major movement toward it.
I faced this same issue recently and I found a pretty good solution.
If you aren't aware yet, check this out: https://github.com/RicoSuter/NSwag
NSwag is a toolchain that integrates with .NET to produce the Open API documentation and UI, but also generates the respective API clients for you.
I've used this tool for the past 2 years when working with Angular and .NET apps, it saves a lot of time and seamlessly integrates with my whole development workflow.
For Azure Functions +v2, a contributor created a generator that in less than 10 lines of code, allow us to expose the Swagger endpoint for an Azure Function class:
https://github.com/Jusas/NSwag.AzureFunctionsV2
Now, if you design HTTP-Triggered Functions using DI, grouping related operations under the same class and leveraging model binding, you might not even need to apply any custom decorator, it just works!
Here's an example of how one real API would look like:
(ignore the base class. It is part of a personal pattern I follow, unrelated to Swagger)
And this is how it looks like using a swagger UI:
There is official library Azure Functions OpenAPI Extension. It is still in preview, but looks great.
Can you drop your V2 Function to run on v1 of the runtime by starting over with a blank function app first?
The MSDN documents for Create an OpenAPI definition for a function (with a date of 11/2018 interestingly enough) example states:
By default, the function app you create uses version 2.x of the
runtime. You must set the runtime version back to 1.x before you
create your function.
But one can't just move the setting to 1:
To pin your function app to the version 1.x runtime, choose ~1 under
Runtime version. This switch is disabled when you have functions in
your app.
Which implies one must create the Function app, publish/create it, set it to V1 and then put in a function before adding a function app.
I am getting error whenever i recompile my workflow package.
to solve this error i have to bounce the server which is used among no of users.
if it is possible to get separate server so i can bounce and test it without disturbing DBA/system admin.
Aha; it seems that you posted two questions for the same problem; this is another one.
As of your problem: Oracle says this:
ORA-06508: PL/SQL: could not find program unit being called: "APPS.ATL_OARR_PCKG" '
in 'PLSQL' API 'ATL_OARR_PCKG.GET_CUSTOM_NOTIF'
Why wouldn't you make sure that all objects, referenced by your package, exist before you compile it? What benefit do you see in having an invalid package? You can't use it anyway, you can't test it, you can't do anything.
Therefore, having yet another server most probably won't fix that problem, because I suspect that missing package (if that's what ATL_OARR_PCKG is) won't automagically appear on the new server.
We have been using the following library for months:
https://unpkg.com/react#15.3.0/dist/react.min.js
Yes - I know we can just reference 15.3 and get the URL rewrite to the latest, but they released a breaking change. That's another issue for another day. Don't get distracted.
Yesterday this simply stopped working. You'll notice that if you load the URL mentioned, that the file is TRUNCATED. Simply cuts off. This made everything we use react with break. Interestingly, if you go to the following URL (without the .js extension) - things work.
https://unpkg.com/react#15.3.0/dist/react.min
My question is - what the heck happened? Why did the URL we've been using for 8 months suddenly stop working, and who can we get to fix it. In the interim, we had a copy locally that we've started referencing (which we probably should have been doing to begin with, since we don't want the automatic upgrade). When things like this happen, who do you inform?
I'm not sure you'll find the answer as to why this file is no longer working here but based off of the website you could reached out to the creator on twitter: https://twitter.com/mjackson
On the website it says:
SUPPORT
unpkg is a free, best-effort service and cannot provide any uptime or
support guarantees.
i.e. you should probably only use this link if you are messing around with a small project and shouldn't be used for any website where you actually care about the uptime of the site.
I'm migrating a large amount of projects from a on premise tfs2010 to vso, nearly all of them was able to migrate without any problems, but a few are creating errors. I am using Opshub Integration Manager Framework-OVSMU-V1.2.0.000.
1.
OH-TFS-Connector-0054: Test Step Id cannot be empty and It must be a valid number. Please check the Mapping and add valid mapping for the Test Step Id.
The most common error. This error is also described in opshub-visual-studio-online-migration-utility-test-cases-failing, but has yet to receive an accepted answer. As mentioned in this post the cause if the problem might be Shared Steps, so I tried removing one from a test case, and that made it pass in the migration utility. Unfortunately I need those test cases and it is not feasible for me to just delete them.
2.
OH-TFS-Connector-0051: Operation failed getCollectionMetaData. Server Error : TF201063: Adding a Test Case link to work item 18374 would result in a circular relationship. To create this link, evaluate the existing links, and remove one of the other links in the cycle.
After inspecting the Work Items that causes the error and concluding that there is no links, and no clear circular reference, not even a Shared Step linking to work item 18374. Upon further inspection I noticed that work item 18374 doesn't even exist.
Any help would be much appreciated.
OH-TFS-Connector-0054: Test Step Id cannot be empty and It must be a valid number. Please check the Mapping and add valid mapping for the Test Step Id.
This issue is addressed in latest release of OVSMU (1.3.0.000). You can download from
https://visualstudiogallery.msdn.microsoft.com/28a90a17-d00c-4660-b7ae-42d58315ccf2
OH-TFS-Connector-0051: Operation failed getCollectionMetaData. Server Error : TF201063: Adding a Test Case link to work item 18374 would result in a circular relationship.
This issue is scheduled for next release which will be out shortly. Check Visual Studio Gallery for further updates.
Thanks.
I'm very new to Apigee.
I'm adding an existing WSDL service as a API proxy.
When fetching the SOAP functions, all looks good. Every single one is imported and are setup correctly.
When i then hit the save button the proxy is created, but are never submitting the revision to the server.
When looking into the problem I see that i get a 502 error back from a file named https://enterprise.apigee.com/gw/upload/[NAME]/tradetracker-api/?validate=true
Also a TypeError: 'undefined' is not an object (evaluating 'b.then') are thrown from a file named 24efdbdd.proxy-editor.js
As i'm using Apigee's own website to add the proxy, so there's not much i can do about it.
This is happening in both Chrome 32, Safari 7 and Firefox 25 and the error has been there for at least a week.
I can't be the only one using Apigee's which keep's getting this error!?
There appears to be an issue with the WSDL file format -- not entirely sure what it is as one WSDL validator I used said it was okay, and another one choked on it saying it wasn't able to parse the file.
I've opened an issue with the Apigee product team to see if A) we can identify the issue with this WSDL and B) improve the product to throw a proper error rather than timing out.
This is fixed in the next release that is scheduled for release on 2/5/2014.