Not able to copy database with name which is deleted.

manish singh 10 Reputation points
2023-01-18T05:13:23.32+00:00

We have deleted the database (ex "ABC_DB") and it is deleted successfully. now I am trying to copy a database with the same name ("ABC_DB") which we deleted but while coping it shows "A database with the same name already exists on this server."

Can you please help with this?

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pratik Somaiya 4,206 Reputation points
    2023-01-18T06:46:11.8033333+00:00

    Hello manish singh

    Azure gives you the opportunity to restore the deleted database back to the point it was deleted or any time within the retention period. The retention is determined by your service tier (7 days for basic, 35 for standard etc.)

    Please check if the deleted database is visible in the portal under "deleted databases" tab under "Settings" on the logical SQL Server resource that hosted the database.

    0 comments No comments

  2. ShaktiSingh-MSFT 14,406 Reputation points Microsoft Employee
    2023-01-18T06:50:49.6566667+00:00

    Hi @manish singh ,

    Welcome to Microsoft Q&A platform and thanks for using Azure services.

    As I understand from the issue, you are unable to create a new SQL database with the same name as the one which is deleted by you on the same server.

    I tried to reproduce the same scenario at my end and could see that on the server page initially I was also prompted that DB name already exists in the server:

    User's image

    Then I duplicated the browser tab and tried again it did not show the error and I could successfully create the DB:

    User's image

    The issue might be due to the browser cache taking previous value in the field. Please try in a different browser tab or in in-cognito mode.

    Hope this helps. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.