Programmable Objects Disabled in Invoke-DatabaseBuild
rconrad
Posts: 9 New member
I'm getting the warning below when I build my project using Invoke-DatabaseBuild and indeed the programmable objects are not included, but when I build in VS they work fine. I cannot find any place that I have disabled programmable objects in my project. Where do I need to look?
WARNING: DbBuildTask: Warning C:\Code\UtilityBilling\Databases\SCA\Client\ClientDB\Programmable Objects\dbo\Functions\enum_Command_AutoDraft.sql(0,0): Programmable Objects are disabled but there are 1979 script(s) present in the Programmable Objects folder (eg. "Programmable Objects\dbo\Functions\enum_Command_AutoDraft.sql"). These scripts will not be included in the build. If you
WARNING: DbBuildTask: Warning C:\Code\UtilityBilling\Databases\SCA\Client\ClientDB\Programmable Objects\dbo\Functions\enum_Command_AutoDraft.sql(0,0): Programmable Objects are disabled but there are 1979 script(s) present in the Programmable Objects folder (eg. "Programmable Objects\dbo\Functions\enum_Command_AutoDraft.sql"). These scripts will not be included in the build. If you
wish to include them in the build, please enable Programmable Objects in Project Settings.
Tagged:
Best Answer
-
Ivo_Miller Posts: 31 Silver 3Hi,
It is worth double checking that you are using equivalent versions of SQL Change Automation for the PowerShell cmdlets and Visual Studio.
Until version 4.3, programmable objects were enabled by setting the DeployChangesForProgrammableObjects property to true. New projects created using version 4.3 will instead use the new ProgrammableObjectHandling option (see here for details). Newer versions of the product will continue to support the old property, but if you create a new project using version 4.3 in Visual Studio, you will need to update the version of SQL Change Automation PowerShell to 4.3, or manually add <DeployChangesForProgrammableObjects>True</DeployChangesForProgrammableObjects> to your project file.
All the best,
Ivo MillerIvo Miller
RedGate Software Developer
Answers
I am now getting an error that TRIM() is not recognized. (If you prefer I can post this as a new question)
WARNING: DbBuildTask: ERROR C:\Code\UtilityBilling\Databases\SCA\Client\ClientDB\Programmable Objects\dbo\Stored Procedures\pgb_custo
Here is a snippet from the project file.
WARNING: DbBuildTask: Warning C:\Users\ullull\source\repos\_SSISDB\_Database\CSI_DW_Migrations\Programmable Objects\ETL\Functions\DelimitedString_Tokenize.sql(0,0): Programmable Objects are d
isabled but there are 1 script(s) present in the Programmable Objects folder (eg. "Programmable Objects\ETL\Functions\DelimitedString_Tokenize.sql"). These scripts will not be included in the
build. If you wish to include them in the build, please enable Programmable Objects in Project Settings.
I am new to SCA and do not know why my programmable objects are being excluded. It is not clear where Project Settings are defined. If it's in the .sqlproj file, it is already configured with
<ProgrammableObjectHandling>UseRepeatableScriptsForAllObjects</ProgrammableObjectHandling>
So that's not it. So my question remains: why are programmable objects being excluded and what do I need to change to include them? I do not follow the poster's comment about specifying a server on Invoke -DatabaseBuild. I did exactly that to no effect:
$ValidatedProject = $MyProject | Invoke-DatabaseBuild -TemporaryDatabaseServer $Db02Conn
<DeployChangesForProgrammableObjects>True</DeployChangesForProgrammableObjects>