且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过数据库发布向导创建数据库脚本

更新时间:2023-02-02 21:49:39





让我给你几个方法

1.

您可以备份数据库并制作其zip文件,然后移动到另一个位置并在那里恢复。



2.



右键单击SSMS中的数据库 - >转到任务 - >点击生成脚本 - >然后指定脚本文件的名称和路径,选择所有数据库对象 - >单击下一步 - >单击高级 - >将 TypesOfData 指定为脚本(仅架构/架构和数据/数据) - >单击确定 - >单击下一步 - >完成。



这将创建包含架构和数据的整个脚本文件,可以在任何sql server上运行。



问候,

Mubin
Hi,

let me give you few approach
1.
You can take backup of your database and make its zip file and then move to another location and restore it there.

2.

Right Click on your database in SSMS-->Go to Tasks--> click on Generate Script--> then specify name and path of your script file, select all database object-->click next -->click advanced --> Specify TypesOfData to Script( Schema Only/Schema and Data/Data only)-->click ok-->click next-->Finish.

this will create entire script file with schema and data which can be run on any sql server .

Regards,
Mubin