SQL Server run Multiple SQL Table Create Scripts -


So I have a lot of tables which I need to run on a fresh database, they are all in one folder, and their There are more than 250.

Is this a good way to go about using SSMS?

option 1: use the batch file [to run all the scripts in one click] of the batch file Use but CMD will inherently use sqlcmd.

Option 2: Submit multiple SQL files in a single SQL file and then execute in SSMS in one shot

Create a simple batch file under the folder (in which your 250 table Creation script live)

  type * .sql & gt; Allinone.sql  

Note: open the top of the txt document and then copy the above content and then save it from extension .bat (ex: merge.bat)
just that batch Double click on the file will give you a single SQL file that you can run in single go in SSMS.


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

svn - Cannot merge back into trunk, must be ancestrally related. But they *are* related as far as I understand -