Run all SQL files from a folder



Run all SQL files from  a folder you can follow the process that will save your time for executing SQL script


Copy this code in a notepad file and change the Server, Database, Username And Password value as your self and save it as a .bat file. copy the file in your SQL script folder and run this bat file.

 REM  
  REM development environment only!!  
 REM  
 pause  
 for %%G in (*.sql) do sqlcmd /S "192.168.10.139\SQLEXPRESS" /d "VSSPORT_DEV" -U "atiour" -P "atiour" -i"%%G"  
 pause  
 REM  
  REM All Script Run Successfully  
 REM  




Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report