There are two options for creating scripts not bound to object creation/updating or pre/post deployment - Script (Build) and Script (Not in build).
Script (Not in build) can be used, for example, for including into a Pre-Deployment or Post-Deployment script by :r directive. They will just be included into generated deployment script.
I tried to use Script (Build) just to see how it is used. First, it did not recognize PRINT instruction: build just fails on it. Second, if I just leave a comment in Script (Build), it just never included into generated deployment script.
I also notices that if to open a Script (Not in build) in VS editor, it shows a toolbar of Execute-Parse-Plan-Connect, while I cannot see or turn on this toolbar for a Script (Build).
The question is - what is the purpose of introducing Script (Build)? How can I harness and use it, why can I need it? At which step of build does it make sense?
If you display properties of the scripts you will see:
So script not in build is just a helper file that you might want to include in a project but it wont be parsed nor compiled into dacpac.
Script Build is a regular file that is parsed and compiled into dacpac, it has the same meaning as table file or stored procedure file. One can use it if he doesn't like to go through Add Item menu or he just want to include multiple objects of different type in one file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With