Open japineda3 opened 3 years ago
Had the same problem. Added my SELECT SERVERPROPERTY('EditionID')
ID to the IN-List
I also have a similar problem with REBUILD/REORGANIZE operations on a partition level. They are supported on Standard Edition of Sql Server, but @editionCheck forbids its usage. I think these feature checks should be more granular, binary separation Enterprise/Non-Enterprise is not working well enough.
Hi, Why doesn´t you include the version of SQL Azure in this check?
### /* Refer to http://docs.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql */ IF (SELECT SERVERPROPERTY('EditionID')) IN (1804890536, 1872460670, 610778273, -2117995310) SET @editionCheck = 1 -- supports enterprise only features: online rebuilds, partitioned indexes and MaxDOP ELSE SET @editionCheck = 0; -- does not support enterprise only features: online rebuilds, partitioned indexes and MaxDOP
_Indexes will be defragmented' + CASE WHEN @onlineRebuild = 0 OR @editionCheck = 0 THEN ' OFFLINE;' ELSE ' ONLINE;' END + ' /* Set online rebuild options; requires Enterprise Edition; not compatible with partition operations, Columnstore indexes in table and XML or Spatial indexes. Up to SQL Server 2008R2, not compatible with clustered indexes with LOB columns in table or non-clustered indexes with LOBs in INCLUDED columns. In SQL Server 2012, not compatible with clustered indexes with LOB columns in table.*/ IF @sqlmajorver <= 11 AND @onlineRebuild = 1 AND @editionCheck = 1 AND @ixtype IN (1,2) AND @containsLOB = 0 AND (@dealMaxPartition IS NULL OR (@dealMaxPartition IS NOT NULL AND @partitionCount = 1)) SET @rebuildcommand = @rebuildcommand + N'ONLINE = ON, ';