Automating Deployment with SQLCMD
So far, we’ve created nine scripts: one to create the database, and eight more containing tables and foreign key relationships. You don’t want to ask your DBAs to load and execute each script individually. This is where the SQLCMD tool comes in—you can create a simple script that will allow users to execute all of your scripts with a simple press of F5.
You can also use SQLCMD to roll back your changes if necessary, so once you’ve created the apply SQLCMD script, we’ll look at creating some rollback scripts.
What Is SQLCMD?
You were very briefly introduced to SQLCMD way back in Chapter 1. It’s a tool, ...