Closed Aoshua closed 2 years ago
@Aoshua
The ID you are using is webapp or appservice (/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Web/serverFarms/MySeverName
), not sql server.
This SDK is in maintenance mode. New SDK will be available at https://aka.ms/azsdk/dotnet/mgmt
@weidongxu-microsoft You're totally right. I switched to azure.SqlServer.GetByReourceGroupAsync(myResourceGroup, serverName)
and that worked perfectly. Thanks for pointing that out!
Question: How can I get an exiting SQL Service instance? Ultimately what I am trying to do is add a database to an exisiting server. Here is what I have tried, but it always returns null for the server:
I'm using
azure
before these lines, so I know that it's not an authentication issue.I'm assuming this is just error on my part, since I'm new to Azure SDK for NET.
I'm using the most recent stable VS Code and Visual Studio 2019. I'm using the Microsoft.Azure.Management.Sql.Fluent package.