2
votes

I migrated my SQL server database to Azure SQL Database successfully and have been using it for a few months now with no problems. Today I attempted to access the database via SSMS and it asked me to sign in so it could add my IP to the firewall (this happens periodically as I am on DSL). I logged in as usual and got an error message:

An error occurred while creating a new firewall rule.

The server you specified xxx.database.windows.net does not exist in any subscription in [email protected]. Either you have signed in with an incorrect account or your server was removed from subscription(s) in this account. Please check your account and try again.

So I checked my Azure portal and sure enough, the SQL database is not listed there anymore. However, my site still runs and accesses the database. How do I get the database put back into my account again without losing the data?

1
Have you tried Azure Support on this? - Shiham
No, I don't have a support plan. - Alan Moore
I had something similar happen to me, however I didn't need the database anymore. Just a thought since the application still runs fine, what if you spun up a new database and just deployed some code to copy the tables from the old db to the new one. - JustLogic
Yeah, well that would be the last resort, but yes that is what I'm considering. I guess it could be a transitory problem, also possible that Azure just made a mistake and will fix it. I did purchase the lowest level support plan so I'm waiting to hear what they have to say before I try reconstructing and copying my database using code which is likely to be a bit painful with 50 tables and thousands of records. - Alan Moore
Did you hear back? what was the problem? - Boboyum

1 Answers

0
votes

I was also facing the same problem today.

enter image description here

What I did is very straightforward. Here are the steps which may help you with this error.

  1. Login to your Azure portal
  2. Go to your SQL Server
  3. Click on the Show Firewall settings

    enter image description here

  4. Add a new rule with your client IP address enter image description here

  5. Then try again to login

Hope it helps.