简体   繁体   中英

Run SQL Server generate script with data from a batch file

My goal is to script out a database with data like you used to with the sql publishing tool that older versions of SQL Server had

I am using SQL Server Express 2017, and I know how to perform this task manually by right clicking on the database->tasks->generate scripts

Is there a.exe being called here, in older versions of SQL Server this would call sqlpubwiz.exe, and you could call this.exe from a cli, and put into a batch file. I am looking to replace this behavior. Can someone let me know the exe that is being called, and let me know how to script against it.

you can use SQL Dumper, easiest way to export the script data (with Insert query)

for more information: https://support.microsoft.com/en-in/help/917825/use-the-sqldumper-exe-utility-to-generate-a-dump-file-in-sql-server

to download the utilityhttps://download.cnet.com/SQL-Dumper/3000-10254_4-10514574.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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