File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,9 @@ public string GetQuery() {
158158 ( ! IsAllowCompression
159159 ? ""
160160 : $ "DATA_COMPRESSION = { compression } , ") +
161- $ "ONLINE = { onlineRebuild } , " +
161+ ( Settings . ServerInfo . MajorVersion <= ServerVersion . Sql2012 && IsPartitioned // 'ONLINE' is not a recognized ALTER INDEX REBUILD PARTITION option
162+ ? ""
163+ : $ "ONLINE = { onlineRebuild } , ") +
162164 $ "MAXDOP = { Settings . Options . MaxDop } );";
163165 break ;
164166
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public override string ToString() => $"SQL Server {ProductVersion} " +
3636
3737 // https://sqlperformance.com/2014/06/sql-indexes/hotfix-sql-2012-rebuilds
3838 public bool IsOnlineRebuildAvailable => IsAzure
39- || ( MajorVersion >= ServerVersion . Sql2014 && IsMaxEdititon ) ;
39+ || ( MajorVersion >= ServerVersion . Sql2008 && IsMaxEdititon ) ;
4040
4141 private string ProductVersion {
4242 get {
You can’t perform that action at this time.
0 commit comments