第一次数据库db1的数据库还原失败....第二天尝试进行第二次还原,它说数据库'db1'已经存在,但不存在 [英] First database restore failed for database db1....on second attempt to restore next day it says database 'db1' already exists but it doesn't

查看:67
本文介绍了第一次数据库db1的数据库还原失败....第二天尝试进行第二次还原,它说数据库'db1'已经存在,但不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库db1的第一次数据库恢复失败....第二天尝试进行第二次恢复时,它说数据库'db1'.已经存在,但不存在.

First database restore failed for database db1....on second attempt to restore next day it says database 'db1'  already exists but it doesn't.

弹性池上的数据库大小为355 GB.

Database size is 355 GB, on elastic pool.

第二个问题是关于我可以用来减少数据库文件大小的选项?

Second question is about the options I could use to reduce the database file size?

谢谢

推荐答案

Hello,


You can only restore a database with a new name. If the restored database is intended as a replacement for the original database, you can rename the original database and then give the restored database the original name using the ALTER DATABASE command in T-SQL.

If you yesterday tried to restore the database with a new database name (let’s say db1) and you want to restore with that database name, then try to remove the database with the following PowerShell script.


Get-AzureRmSqlDatabase -ResourceGroupName


ResourceGroupName -ServerName
ResourceGroupName -ServerName


SqlServerName -DatabaseName
SqlServerName -DatabaseName


这篇关于第一次数据库db1的数据库还原失败....第二天尝试进行第二次还原,它说数据库'db1'已经存在,但不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆