Damian Maclennan Blog

Damian's Datalog

Who woulda thought DOS was still useful

I'm working on a project at the moment where I find myself deploying large blocks of code from my laptop to a dev server or the live server on a fairly regular basis. Keeping code in sync was becomming a bit of an issue, I needed a good way to deploy a whole bunch of stored procs from my dev machine to a staging server. I just found out about a small app that does this, which I will review here soon, but the method I've been using is an ultra simple, Unix inspired way of doing things :

1. Drop into a command shell (Start - Run - CMD) and go to the directory holding all your scripts.

2. run this command “Type *.sql > all.sql”

What you end up is one big file containing all the scripts in that directory. Paste that into Query Analyzer and run it. All done.

 

Legacy Comments


macka
2003-10-24
re: Who woulda thought DOS was still useful
You can also use the >> operator to append files to an existing file.

type new.sql >> all.sql