SqlPackage 15.0.4897.1, started failing with an error related to deployment plan generation

GeethaThatipatri-MSFT 29,287 Reputation points Microsoft Employee
2024-07-19T17:34:13.52+00:00

Why are my database update tasks failing with an error related to the 'SqlIndex' class and its 'Online' property when using SqlPackage version 15.0.4897.1, and how can I resolve this issue?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,287 Reputation points Microsoft Employee
    2024-07-19T17:36:59.13+00:00

    Greeting!

    To resolve this issue, you need to update SqlPackage to a newer version.please follow the SQLPackage version 162.2.111.2 documentation: DacFx and SqlPackage release notes - SQL Server | Microsoft Learn

    The issue you experienced with the “SqlIndex” class not containing the “Online” property was likely due to a limitation in the older version of SqlPackage (15.0.4897.1). The error related to deployment plan generation and the “Online” property for indexes is a feature that allows for online index operations, which allows concurrent user access to the underlying table or clustered index data and any associated nonclustered indexes during these index operations.

    For example, while a clustered index is being rebuilt by one user, that user and others can continue to update and query the underlying data. When you perform data definition language (DDL) operations offline, such as building or rebuilding a clustered index, these operations hold exclusive (X) locks on the underlying data and associated indexes. This prevents modifications and queries to the underlying data until the index operation is complete. When You updated to the newer version of SqlPackage (162.2.111.2), this issue will be resolved. This newer version includes support for online index operations, which can be specified as a command line publish property or as a component in the SQL project model

    User's image

    This feature was not present or was not functioning correctly in the older version, hence the error that You encountered It’s important to keep tools like SqlPackage up to date to benefit from the latest features and bug fixes. The update to the latest version likely included the necessary code changes to handle the “Online” property for the “SqlIndex” class correctly, allowing Your database update tasks to succeed without errors.

    Regards

    Geetha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.