Reputation: 337
We have some solutionDB(lets say solution100) that stuck in the creating state so the serverName would be NULL, I have to delete the solutionDB if the ServerName is null.
So first I have to get the list of SQL databases and server names, iterate through the list, and then delete the solutionDB if the serverName is NULL.
Upvotes: 1
Views: 131
Reputation: 2267
From what you describe, I guess that you are creating an SQL Database with a new SQL Server. But, the creation is stuck at server level, which means the SQL server has not been created yet. There is no server, so there is no database yet at all. Hence, there is nothing you can delete.
Now, the only thing you need to do is to figure out at what step the creation is stuck.
Here are some hints for you.
Log into the new Portal, click Browse at the left navigation of the page.
Enter Audit Logs to search. And then, click Audit Logs
Click filter, and choose the resource group of your SQL Database to narrow your search.
Now, you will be able to see a column with operation Update SQL database. Click it, and you will be able to see what's wrong with your SQL database creation.
Upvotes: 3