Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Enterprise SQL Server features (i.e. Indexes ONLINE=ON) #27

Closed
kramer1007 opened this issue Aug 17, 2021 · 11 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kramer1007
Copy link

When building a SQL Server Database project, if SQL files include enterprise features such as Online Index building, these statements are ignored when outputting the SQL code or applying to target databases.

How to reproduce: add an index to a database project that would get deployed. test it with "WITH (ONLINE = ON)" and without. You'll see that when looking at the output, you'll see that the "WITH (ONLINE = ON)" is ignored.

@dzsquared dzsquared added enhancement New feature or request backlog Item has been added to backlog labels Oct 18, 2021
@kramer1007
Copy link
Author

@dzsquared any update on this? i see it's on the backlog.

@kramer1007
Copy link
Author

image

@tony-donley
Copy link

Persisted options are honored or ignored according to publish profile flags, but non-persisted options are always ignored. I would like to see SOME non-persisted options honored, such as ONLINE and SORT_IN_TEMPDB. DROP_EXISTING would need to be applied intelligently because it would fail if the index doesn't exist.

@kramer1007
Copy link
Author

image

@kramer1007
Copy link
Author

image

@tony-donley
Copy link

@dzsquared Thanks for the great information you provided at PASS last week. I appreciated the session.

Is there any interest in this issue? I don't think this is limited to just Enterprise features, it's other non-persisted options also, like SORT_IN_TEMPDB and MAXDOP, which when applied intelligently can reduce the outage window during a deployment.

@kramer1007
Copy link
Author

Great points Tony! I would have to agree with those options as well.

image

@dzsquared dzsquared added this to the 162.2 milestone Feb 13, 2024
@dzsquared dzsquared removed the backlog Item has been added to backlog label Feb 13, 2024
@asrichesson
Copy link

It would be nice to have an option in the publish profile to create all indexes with ONLINE = ON regardless if the option is not set in the Create Index DDL statement. Right now, I am using this contributor to set ONLINE = ON for all create index statements.

@llali
Copy link
Member

llali commented Feb 16, 2024

this feature is implemented in dacFx and available in the preview version 162.2.91-preview

@dzsquared
Copy link
Contributor

Support for applying the non-persistent ONLINE index option has been added in SqlPackage 162.2, releasing this morning.

There will be a blog post shortly with more details, but there's 2 layers of control over the behavior:

  1. A command line publish property (/p:PerformIndexOperationsOnline) can be set to true, which will apply to eligible index operations for that deployment.
  2. ONLINE = ON or ONLINE = OFF statements on indexes in a SQL project will be incorporated in the compiled model (.dacpac) and when the dacpac is published those options override any command line options. The SQL projects functionality is available in the next Microsoft.Build.Sql SDK version (very soon). For use with the original SQL projects, it will roll to the different tools - Azure Data Studio will be the first (very soon) and SSDT will come with a future preview of Visual Studio 17.10.

I noticed that there was some discussion here about other non-persisted options - we would be happy to discuss any of those individually in new issues! (I ask for individually so we can be sure to determine and confirm the right behavior for each one)

@namangupta211
Copy link

namangupta211 commented Feb 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants