SQL Change Automation 4

Include scripts

During deployment, SQL Change Automation uses the sqlcmd utility to execute your migration scripts. Aside from enabling you to include variables in your deployment, this also allows you to run other script files from within your pre-deployment and post-deployment scripts by using the :r <  filename  > command.

This can be useful if you have a script containing complex logic or large amounts of data, and you want to make the file more readable by splitting sections of it into individual files.

The ability to include files within your scripts is currently restricted to pre-deployment and post-deployment scripts. Migration scripts and programmable objects do not support SQLCMD syntax due to limitations within the T-SQL parser.

For a worked example, see using include scripts.



Didn't find what you were looking for?