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

后端 未结 7 1376
梦如初夏
梦如初夏 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:14

    Here are some options to think over (prioritised in terms of what I would recommend):-

    • A simple backup and restore will be the easiest and quickest solution;
    • Using a data scripting tool (like Red-Gate's Data Compare) could solve your needs;
      • Use the database comparison as part of Visual Studio.
    • A SSIS package could be developed to pump data back and forth between the two instances; or
    • Write your own script using the SET IDENTITY INSERT ON / OFF command for the identity seeded tables

提交回复
热议问题