Want to create a script to export Data and tables and views to a sql script

后端 未结 7 1288
梦如初夏
梦如初夏 2021-02-05 03:26

Want to create a script to export Data and tables and views to a sql script.

I have SQL Server 2008 r2.

So far I\'ve only been able to automatically generate an

7条回答
  •  梦如初夏
    2021-02-05 04:01

    Like @jhewlett said that will be the best way to do it. to answer the question in the comment section. no it shouldn't be a problem. Just make sure that the SQL Server Versions are the same. Had a bit of an issue not to long ago where there were two pc's with different releases of the R2 installed and couldn't restore the backup. Other thing you can also do is to script the entire database with data, but this will not be recommended as it could take a long time to generate the script and for it to finish running on the other computer.

    Or you can simply just stop the SQL server instance and copy the database away onto an external hard drive and re-attach it to the other server. just remember to start the instances after doing this step.

提交回复
热议问题