最简单(最简单)的方法,使SQL Server转储并将该转储导入另一个SQL Server

时间:2023-01-18 18:06:53

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.

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

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

例如,如果我准备了一个数据库,其中包含为新客户实现新数据库的所有数据集,则该数据库名为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

然后我必须在某个外部服务器上为客户设置相同的DB,例如在架构DB_MY_CUSTOMER中

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

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

Possibly with SQL Server Management Studio?

可能与SQL Server Management Studio一起使用?

2 个解决方案

#1


17  

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.

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

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:.

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

#2


-1  

This is called replication : http://databases.about.com/od/sqlserver/ht/distribution.htm

这称为复制:http://databases.about.com/od/sqlserver/ht/distribution.htm

Try to look to the snapshot replication. It is configurable to determine the destination database.

尝试查看快照复制。它可配置为确定目标数据库。

#1


17  

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.

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

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:.

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

#2


-1  

This is called replication : http://databases.about.com/od/sqlserver/ht/distribution.htm

这称为复制:http://databases.about.com/od/sqlserver/ht/distribution.htm

Try to look to the snapshot replication. It is configurable to determine the destination database.

尝试查看快照复制。它可配置为确定目标数据库。