Every release we have a series of scripts that are used to update the db.
The scripts come from various sources and can include, schma changes, new
objects, and data updates.
I would like to automate this using Powershell, run each individual script
file and group all of them in one transaction. Some of the script files are
contained within a transaction and rollback on error.
I attempted running this as a dynamic sql script in management studio using
sqlcmd, but it appears that sql command run in its own connection, so
therefore the driver
does not recognize that an error has occurred.