简体   繁体   English

能否使用SQLCMD从2012年生成脚本以在2008年运行?

[英]Can you use SQLCMD to generate scripts from 2012 to run in 2008?

I need to take some databases from 2012 back to 2008 and I have done most using the generate scripts method (select 2008 as one of the options and schema and data). 我需要将一些数据库从2012年追溯到2008年,并且大部分工作都是使用generate scripts方法(选择2008作为选项以及架构和数据之一)。 When I hit a large database, I get an error about Insufficient Memory to continue the execution of the program. 当我遇到大型数据库时,出现有关内存不足的错误,无法继续执行程序。 Is there a way to use SQLCMD in 2012 and still pass in the flags so that it will generate a script to be run on SQL 2008? 有没有一种方法可以在2012年使用SQLCMD并且仍然传递标志,以便它将生成要在SQL 2008上运行的脚本? Or any other option or known size limit for using SSMS to generate scripts for large databases? 还是使用SSMS生成大型数据库脚本的任何其他选项或已知大小限制? Thanks for any help, Mike 谢谢您的帮助,迈克

This can be done quite easily using the SQL Server Import Export Wizard. 使用SQL Server导入导出向导可以很容易地做到这一点。 If you have special constraints setup on the tables, you may want to create those tables first. 如果在表上设置了特殊的约束,则可能要先创建这些表。 The tool is fairly quick and gives step-by-step status updates. 该工具相当快速,并提供了逐步的状态更新。

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

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