简体   繁体   English

将数据库备份还原到另一个数据库

[英]restore a database backup to another database

There is a database name "Sample"有一个数据库名称“Sample”

another database is "test"另一个数据库是“测试”

I take backup of "Sample" and tried to restore it into "test" ,but it denied me to do so in SSMS.我备份了“样本”并尝试将其恢复到“测试”,但它拒绝我在 SSMS 中这样做。

Is there any way?有什么办法吗?

Backup using scripts option.使用脚本选项备份。 To generate script right click database select tasks and then select generate script.. option.要生成脚本,请右键单击数据库选择任务,然后选择生成脚本...选项。

First remove create database line from script file and don't forgot to select current database as test while running the script file.首先从脚本文件中删除 create database 行,并且在运行脚本文件时不要忘记选择当前数据库作为测试。

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

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