Sqlfrenzy (7/30/2009)
An easy way of executing scripts.....Create a batch file and place it in the folder containing the scripts...
@for /r %%s in (.) do (echo ..............%%s /b >> "C:\Build Deployment\output\Log.txt"
sqlcmd -d Dbname -Usa -Psql2005 -i "%%s" >> "C:\Build Deployment\output\Log.txt")
Problem with this is that you have to give either SA or Login ( mostly administrator) password in P parameter and that could be read by other people working on project.
It would be OK to run/call commands in batch when you are doing it on fly.
SQL DBA.