Importing/Exporting SQL Server 2008 R2 中的视图
Importing/Exporting Views in SQL Server 2008 R2
我试图将数据库从一台机器移动到另一台机器,并决定使用 Import/Export 功能来帮助我解决问题。一切都很顺利,除了我所有的观点都变成了表格。
经过一番挖掘,我发现了这个:“If the source data is a view, the SQL Server Import and Export Wizard automatically converts the view to a table in the destination.”
有谁知道如何禁用此自动 "feature"?还是仅在导入表格后重新构建视图的无痛方式?我尝试了一些 "CREATE to" 脚本,但它们总是失败,我想不出另一种方法来保留我的数据库结构。
听起来 Import/Export 向导不是您想要的。
I can't think of another way to preserve the structure of my database.
有一个 'Copy Database' 向导,但我个人更喜欢备份数据库,然后将备份恢复到新实例。
编辑:
两个选项的参考起点:https://msdn.microsoft.com/en-us/library/ms189624(v=sql.105).aspx
我试图将数据库从一台机器移动到另一台机器,并决定使用 Import/Export 功能来帮助我解决问题。一切都很顺利,除了我所有的观点都变成了表格。
经过一番挖掘,我发现了这个:“If the source data is a view, the SQL Server Import and Export Wizard automatically converts the view to a table in the destination.”
有谁知道如何禁用此自动 "feature"?还是仅在导入表格后重新构建视图的无痛方式?我尝试了一些 "CREATE to" 脚本,但它们总是失败,我想不出另一种方法来保留我的数据库结构。
听起来 Import/Export 向导不是您想要的。
I can't think of another way to preserve the structure of my database.
有一个 'Copy Database' 向导,但我个人更喜欢备份数据库,然后将备份恢复到新实例。
编辑: 两个选项的参考起点:https://msdn.microsoft.com/en-us/library/ms189624(v=sql.105).aspx