What are the challenges you face when working across database platforms? Take the survey
Options

Handling nested dependencies during deployment

Hi. We are experiencing difficulties deploying changes where the changed object is referenced by one or more schemabound objects.

From what I gather from your documentation, the comparison option "IncludeDependencies" should ensure objects necessary to deploy the changed objects are handled.

In our current release, we are attempting to change the collation of a single column of a single table. The table we're attempting to change is referenced by a schemabound, user-defined scalar function. With the comparison options specified below, the release throws the following error:
2017-06-21T08:41:00.9772762Z ##[error]System.Management.Automation.CmdletInvocationException: Applying update script failed: The object 'function-name' is dependent on column 'column in referenced table'.

It appears to try to change the table without handling the UDF, even though the function is schemabound and the comparison option "IncludeDependencies" is specified.

Why is this happening?

Regards,
Joakim Lindeng Engeset

Environment info
Build server: Visual Studio Team Services
Target SQL Server: Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Release task: Redgate DLM Automation 2: Release
Release task settings:
- Operation: Deploy database changes from a package
- Ignore static data: False
- SQL Compare options: IgnoreTriggers,IgnoretSQLt,IncludeDependencies
- Query batch timeout (in seconds): 500
- Transaction isolation level: Serializable
Tagged:

Comments

  • Options
    Hey Joakim,

    This may be an issue with recognizing nested UDF dependencies - I've reached out to you via email for more info.

    Kind Regards,
    Andrew Pierce
    Technical Sales Engineer
    Redgate Software
Sign In or Register to comment.