最好的(最简单的)方式,使SQL Server转储和转储在另一个SQL Server中 [英] Best (easiest) way to make a SQL Server dump and import that dump in another SQL Server

查看:208
本文介绍了最好的(最简单的)方式,使SQL Server转储和转储在另一个SQL Server中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个服务器在SQL Server中实现数据库导出(转储),并在另一个SQL Server中导入该转储,而不一定在同一模式名称。



例如,如果我有一个数据库准备好所有的数据集,为新的客户实现一个新的数据库,那么这个数据库就是名为DB_EMPTY $ / b
$ b

然后我必须在一些外部服务器上为客户设置相同的DB,例如在模式DB_MY_CUSTOMER中



导出(转储)DB_EMPTY的最佳/最简单的方法是什么?导入DB_MY_CUSTOMER?



可能使用SQL Server Management Studio?

解决方案

p>一个简单的方法是使用SQL Server Management Studio,在对象资源管理器中右键单击要导出的数据库,选择任务 - > 备份,然后在对话框底部的目标框中选择目标和文件名。您可以使用各种设置进行播放,但不需要。



要在另一台服务器上恢复基本相反,请选择任务 - > 恢复 - > 数据库,在对话框中选择从设备,然后单击浏览省略号,从那里您将获得浏览对话框,单击添加,然后导航到您创建的备份文件。您可以在 To数据库文本框中更改数据库名称,并通过转到选项选项卡并更改还原为标记为的表中的列条目将数据库文件还原为:


I would like to achieve a database export (dump) in SQL Server from one server and import that dump in another SQL Server and not necessarily in the same schema name.

For example if I have a database prepared with all the data set for implement a new DB for a new customer, that db is for example named DB_EMPTY

And then I have to setup the same DB on some external server for a customer for example in the schema DB_MY_CUSTOMER

What is the best/simplest way to export (dump) a DB_EMPTY, and import it in DB_MY_CUSTOMER?

Possibly with SQL Server Management Studio?

解决方案

An easy way would be to use SQL Server Management Studio, in the Object Explorer right click on the database you want to export, select Tasks -> Back Up, then select a destination and file name in the Destination box at the bottom of the dialog. You can play around with the various settings, but you don't need to.

To restore it on another server is basically the opposite, choose Tasks -> Restore -> Database, in the dialog select From Device, then click the browse ellipsis, from there you get a browse dialog, click Add and then navigate to the back up file you created. You can change the databse name in the To database textbox, and control where the files get stored by going to the Options tab and altering the Restore As column entries in the table labelled as Restore the database files as:.

这篇关于最好的(最简单的)方式,使SQL Server转储和转储在另一个SQL Server中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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