将整个数据库复制到MsSql中的另一个数据库 [英] Copying entire database to another database in MsSql

查看:45
本文介绍了将整个数据库复制到MsSql中的另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将一个数据库复制到另一个数据库而不知道其内容(表名,行等)?我正在考虑使用INFORMATION_SCHEMA元数据和SqlBulkCopy,但它们似乎不够用。有什么指针吗?在此先感谢。

Hi, is there a way to copy one database to another one without knowing its content (table names, rows etc)? I'm thinking of using INFORMATION_SCHEMA meta-datas and SqlBulkCopy but they seem to be insufficient. Any pointers? Thanks in advance.

推荐答案

正常的方法是备份/恢复。如果您要移动架构,则需要遍历依赖关系结构,因为您需要先处理外键并首先创建适当的表和视图。



我们使用Red-Gate工具套件进行此类操作,但它们不是免费的!
The normal way of doing this is backup/restore. If you are going to move the schema only you are going to need to walk the dependency structure as you will need to cater for foreign keys and create the appropriate tables and views first.

We use Red-Gate suite of tools for this type of operation but they are not free!


这篇关于将整个数据库复制到MsSql中的另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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