Tuesday, February 22, 2011

Using SQLCMD to Execute Multiple SQL Server Scripts

In the root C:\ folder, I create a file called create_db.bat which I use to create the database with all objects 

SQLCMD -E -ddatabasename -ic:\SQL\CMS_Avatar.sql
PAUSE

Double clicking the .bat file, I see that each script processed and that the database created successfully.



No comments:

Post a Comment