Welcome back at part II of the installation and configuration of the SQL Resource Provider in Azure Stack. We started in the last post the deployment of the SQL VM that will host the RP and a standalone SQL installation. Then we added the SQLRP dns entry. When the deployment was successful you are good to go and import the RP into Azure Stack. In my case it failed the first time. When I logged in the SQL VM it was actually still running the deployment. So I waited to the powershell.exe processes to finish and restarted the deployment script from the last blog post (run the last line again)
After a while the deployment was successful. The next part is to register the SQL RP in Azure Stack. Run this script below to add the SQL RP.
As Florent noticed the password was not correct in the documentation. It should be sqlRpPassw0rd. For the SQL RP Username use sqlRpUsername:
$AadTenantDirectoryName = 'azurestackeu.onmicrosoft.com'
$SecurePassword = ConvertTo-SecureString -AsPlainText -String "sqlRpPassw0rd" -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ("sqlRpUserName", $SecurePassword)
.\Register-SqlRP.ps1 -AadTenantDirectoryName $AadTenantDirectoryName -manifestCredential $cred
When prompted enter your Azure Stack Service Admin credentials in the Azure AD popup:
The resource provider is now being imported. After a moment you will receive the message that the resource provider is registered successful:
Now go to the Azure Stack Portal and go to the Resource Provider tile. Click the just added SQL-LOCAL resource provider and click on the “Go to Resource Provider Management”
In the previous step we only imported the RP in Azure Stack, we didn’t add any SQL server to host the tenant databases on. So we need to do this now by clicking the servers number 0 and then click add:
Specify the name of the SQL server. I used the same name as the RP. Use the SA account as username and the password you specified during the deployment. Then click on OK to add the server:
And there we go! We added the SQL server to the SQL hosting servers:
Next step is to add the new service to the plan so tenants can consume it. Select the plan you created for your tenants and under the settings blade select services. Then choose the Add New and select under the Select Services blade the Microsoft.Sql:
Specify the locations you want to use and set the quota’s. Then click OK and OK
When you login to the Azure Stack Portal as tenant you now have the option to select Sql Server Database under the NEW -> Data + Storage:
Give the database a name and create a new SQL Server. I am not sure why Azure (and AzureStack) is giving me the illusion for creating a new server. Its nothing more than a record to the DB server that is assigned earlier on. Anyhow, create the server and specify a username and password for the SQL Server:
Select the SKU and finally click on the Create:
And the deployment succeeded! We have our first SQL DB on Azure Stack:
When we check back on the box we see the DB created:
That’s the SQL Resource Provider. In the next blog series we will add the Web App Service!