Rename of database failed with partial rename in Sql Azure

I created a copy of an existing database, then migrated the database to V12 for testing.

Example:

originalDb  was copied to originalDb-copy

originalDb-copy was migrated to V12

originalDb deleted

originalDb-copy renamed to originalDb.

logging into the server without specifying a database the sys.databases contains: "master" and "originalDb-copy" but nothing can be done with "originalDb-copy" (cannot delete it and it contains no tables)

If I log into the server specifying "originalDb" then sys.databases contains: "master" and "orginalDb".

originalDb and originalDb-copy have different database_id's.

How do I clean up this mess?

July 31st, 2015 4:55pm

This issue was resolved offline.

There is a difference between sys.databases on SQL Azure from sys.databases on SQL Server.

In SQL Azure, sys.database is only up to date on the master. As a result, you will need to connect directly to the master database to see all databases on a server. If you connect directly to a non-master DB then sys.database will only show that database and the master.

The full documentation can be found at https://msdn.microsoft.com/en-us/library/azure/ee336235.aspx

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 3:43pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics