Currently I am using the DMS Service, which migrates the onprem SQL Databases to Azure, one thing this does not do is it doesnt create the Azure SQL Databases same used in onprem, we have to manually build this. I have 200 databases which needs to be build in azure, how Can I go about automating this???
Asked
Active
Viewed 41 times
2 Answers
0
Easiest way - use powershell. Something like this should do the trick:
1..200 | ForEach-Object {
New-AzureRmSqlDatabase -DatabaseName "somename-$PSItem" -ServerName "someserver" `
-ResourceGroupName "somergName" ... # other params go here
}
if you want to give them meaningful names you should pass in array of names and use those in the iteration

4c74356b41
- 69,186
- 6
- 100
- 141
0
Have you used Visual Studio ARM templates extension? If not use it, that is the easiest way. You can use Nested templates to get the job done and increment with a depends on attribute. Check this link out.
Let me know if you need help.
Thanks!

DevDisrupt
- 154
- 5