You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-sql/managed-instance/frequently-asked-questions-faq.yml
+27-3Lines changed: 27 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -73,14 +73,14 @@ sections:
73
73
answer: |
74
74
### Where can I find known issues and defects?
75
75
76
-
For product defects and known issues, see [Known issues](doc-changes-updates-known-issues.md).
76
+
For product defects and known issues, see [Known issues](doc-changes-updates-knownissues.md).
77
77
78
78
- question: |
79
79
New features
80
80
answer: |
81
81
### Where can I find latest features and the features in public preview?
82
82
83
-
For new and preview features, see [What's new](doc-changes-updates-release-notes-whats-new.md).
83
+
For new and preview features, see [Release notes](doc-changes-updates-release-notes-whats-new.md).
84
84
85
85
- question: |
86
86
Create, update, delete or move SQL Managed Instance
@@ -112,7 +112,31 @@ sections:
112
112
### How much time does it take to create or update an instance, or to restore a database?
113
113
114
114
Expected time to create a new managed instance or to change service tiers (vCores, storage), depends on several factors. See [Management operations](sql-managed-instance-paas-overview.md#management-operations).
115
-
115
+
116
+
- question: |
117
+
Create, update, delete or move database
118
+
answer: |
119
+
### Can I drop and recreate a database on a managed instance using the same database name?
120
+
121
+
Restoring each database is guaranteed during the entire defined retention period. This even applies to databases that were created and then deleted after only a few seconds. When a database is created, deleted, or restored, backups are taken at different intervals to preserve the data so it's possible to restore during the given retention period. If a database is dropped before a backup operation completes, the drop operation may be blocked with the following error:
122
+
123
+
`Message database 'backup_restore_db_lkg_native_restore' already exists. Choose a different database name.`
124
+
125
+
To avoid this error, check the state of the drop operation before recreating a database with the same name (see [sys.dm_operation_status](/sql/relational-databases/system-dynamic-management-views/sys-dm-operation-status-azure-sql-database?view=azuresqldb-current&preserve-view=true) for more information). Once the operation state shows **Completed**, it's possible to RESTORE or CREATE a database with the same name.
126
+
127
+
The following common use cases are likely to encounter this error:
128
+
129
+
* If multiple databases are dropped and created again with the same name in short succession.
130
+
When a database is dropped, the remaining tail-end of the transaction log is backed up synchronously before the drop operation finishes, as the image shows:
It's not possible to create a database with the same name until the [tail-log is backed up](/sql/relational-databases/backup-restore/tail-log-backups-sql-server) and the drop operation completes. The sequential nature of the drop operation puts databases dropped in short succession into a queue, which can prolong the process of dropping the databases and delays the possibility of creating new ones using the same name.
135
+
136
+
137
+
* If a database is restored and dropped before a full backup is created.
138
+
When a database is restored, the first step of the restoration process is to take a new full backup of the database. If you try to restore a database, and then drop it immediately before the full backup completes, you will not be able to drop the database and create another database with that same name until the full backup is taken, and the database drop operation completes. Depending on the size of the database, the full backup could take hours.
0 commit comments