1

Let's assume I want to deploy something like this to SQL Server,

ALTER TABLE foo
    ALTER COLUMN a varchar(11) NOT NULL
    WITH (ONLINE = ON);

This will work fine if your version of SQL Server is "Enterprise" but if you don't pay that much, you'll get this warning (as taken from "Microsoft SQL Server 2017 (RTM-CU12) (KB4464082) - 14.0.3045.24 (X64)")

Msg 1712 Level 16 State 1 Line 3

Online index operations can only be performed in Enterprise edition of SQL Server.

What I would like to happen is that WITH (ONLINE = ON); is provided for users of Enterprise, but that if you're not on Enterprise, because the migration still must happen that it falls back to ONLINE = OFF?

There is no ONLINE = IF_PAID_ENOUGH,

| ONLINE = {   
      ON [ ( <low_priority_lock_wait> ) ]   
    | OFF } 

Is there a supported mechanism to deploy to both crippled and non-crippled versions of SQL Server?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.