Press "Enter" to skip to content

Executing a Folder of SQL Scripts against SQL Server

Jess Pomfret has a quick Powershell snippet for us:

Another week and another useful dbatools snippet for you today.  Last week at work I was given a folder of 1,500 scripts – each containing a create table statement. Can you imagine having to open each file in Management Studio to be able to execute it? Thank goodness we have PowerShell and dbatools on our side.

Click through for the command, as well as Jess’s explanation of how it works.

One Comment

Comments are closed.