How to save a SQLCMD code as a executable file

╄→гoц情女王★ 提交于 2019-12-13 04:33:56

问题


I have a set of SQLCMD codes which are to be saved as exe files so that people can just execute the file rather than copy paste the code and run the command in command line.


回答1:


Write your sql code to file for example script.sql and than create a batch file (for example run.bat) with below command

sqlcmd -U user -P passwrod -S SerwerName -i C:\script.sql


来源:https://stackoverflow.com/questions/18004258/how-to-save-a-sqlcmd-code-as-a-executable-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!