Can I create two SQL DB's from batch file? - TechRepublic
Question
March 4, 2009 at 03:17 AM
ajspruit911

Can I create two SQL DB’s from batch file?

by ajspruit911 . Updated 17 years, 4 months ago

With very little knowledge of .bat files and even less of SQL scripting i might be asking the imposible here but fundimentily i am trying to create databases from a .bat file.

Big picture:

I need to create two databases with the same name one prefixed M and the other prefixed R (i.e. MYDBM and MYDBR). I want to be able to pass the database name to create, as a parameter to the bat file.

I also need to be able to specify what machine it needs to be on from within the bat file or parameter.

Im really not sure if this can be done or not and if so where to start, if anyone with more SQL/Scripting knowledge could help or point me in the right direction it would be much appricaited. 😀

thanks for reading
AJ

This discussion is locked

All Comments