简体   繁体   English

在现有数据库上(还原)还原数据库是否与通过在MS SQL Server中删除现有数据库来还原数据库不同?

[英]Is restoring a database on existing one (replacing) different from restoring database by deleting the existing one in MS SQL Server?

I have to restore a database of 1 TB size from Production to Development. 我必须从生产到开发还原1 TB大小的数据库。 The current Development database is of 500 GB size and I have 700 GB free space on Development server SQL drive. 当前的开发数据库大小为500 GB,开发服务器SQL驱动器上有700 GB的可用空间。 Now, I should be able to restore the DB to Dev as 500+700=1200 GB space available on DEV. 现在,我应该能够将数据库还原为Dev,因为DEV上的可用空间为500 + 700 = 1200 GB。 Is this possible or should I drop the existing 500 GB Dev database and restore the Prod backup on DEV? 这是否可行,还是应该删除现有的500 GB开发数据库并在DEV上还原Prod备份?

How come, replacing the existing database by restore, is different from dropping the existing db then restore in MS SQL Server context? 通过还原替换现有数据库的方式与在MS SQL Server上下文中删除现有数据库然后还原的方式有何不同?

Can anybody please explain? 有人可以解释吗?

If you restore into an existing db name, then SQL Server will delete the existing database for you and then create the new (database files) so that the restore process can copy data from the backup to the (newly created) database files. 如果还原到现有的数据库名称,则SQL Server将为您删除现有的数据库,然后创建新的(数据库文件),以便还原过程可以将数据从备份复制到(新创建的)数据库文件。 Ie, same thing as if you first delete the database. 即,与您第一次删除数据库一样。

(If the existing database file has the same logical name and file size, then the actual file deletion and creation doesn't happen since the "containers" are already there.) (如果现有数据库文件具有相同的逻辑名称和文件大小,则由于“容器”已经存在,因此不会发生实际的文件删除和创建。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM