SQL Server Transaction Replication error Online index operations can only be performed in Enterprise edition of SQL Server from Ent to Standard

Ted Fletcher 1 Reputation point
2021-10-03T16:10:09.083+00:00

I'm setting up transactional replication for multiple databases in SQL Server where the publisher is on SQL Server 2014 Enterprise Edition and the target is SQL Server 2017 Standard. All but 2 of the databases work great, and the error I'm running into is right at the end of applying the snapshot to the subscriber for those 2.

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

I'm assuming this means that those 2 databases have at one point applied indexing or changes with ONLINE=ON? I have attempted to create the snapshot without the clustered and nonclustered indexes and keep hitting the error as well.

If this is true, Is there a way to tell which articles in the database have been scripted with ONLINE=ON to cause this error to pop up?

I'm planning a full index rebuild with ONLINE=OFF on the smaller of the source databases hoping that is the workaround but am curious if anyone out there knows the solution. Would hate to have to be forced to get Enterprise Edition just because of this error!

UPDATE: The index rebuild did not get me away from the error. Is there a method by chance to do transactional replication without the primary key indexing being applied?

Azure SQL Database
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
568 questions
Developer technologies Transact-SQL
SQL Server Other
{count} votes

3 answers

Sort by: Most helpful
  1. Ronen Ariely 15,206 Reputation points
    2021-10-03T22:53:38.867+00:00

    Awesome! I LOVE THIS QUESTION 137128-image.png 137128-image.png 137128-image.png

    Finally we have excuse to dig to the internals

    I'm assuming this means that those 2 databases have at one point applied indexing or changes with ONLINE=ON?

    This make sense...

    But remember that "Online index operations" can include multiple tasks like CREATE/ALTER/DROP INDEX; ALTER TABLE (add or drop UNIQUE or PRIMARY KEY constraints with CLUSTERED index option and alter columns).

    am curious if anyone out there knows the solution

    For first step, we need to find who/how/which task was executed and used ONLINE which lead to this issue. Meaning we need to find the task which was used ONLINE and block you from using none-Enterprise edition.

    Note! For the sake of the discussion I will speak about CREATE INDEX but the same procedure can be applied to other ONLINE tasks, which are logged in the transaction log.

    This might be a bit complex and advance, since the information about how we created the index, is not stored in the database tables (metadata) as much as remember since once it was created it has no value/uses (usually, since as we found now it might have a value in this question).

    Therefore, we need to pull the information from the transaction log exactly from the same place that the transaction replication takes it from.

    For this task we will use the undocumented function fn_dblog

    Lets demonstrate it from start to end

    ----------

    I AM GETTING ERROR FROM THE FORUM WHEN POSTING THE ANSWER!

    Give me some time and I will find a workaround. Maybe this is too long answer... I will try to post the rest in separate message

    137110-image.png

    1 person found this answer helpful.

  2. Ronen Ariely 15,206 Reputation points
    2021-10-03T23:11:35.997+00:00
    1 person found this answer helpful.

  3. Dileep Veldi 1 Reputation point
    2021-10-19T07:13:04.957+00:00

    This step-by-step guide walks you through the basics of using SQL transactional replication between on-premises infrastructure and Cloud PaaS infrastructure. Get an overview of standard transactional replication from on-premises SQL server database to Azure SQL managed instance database.

    https://dileepveldi.medium.com/standard-transactional-replication-from-on-premise-sql-to-azure-sql-managed-instance-ba52a60f0ba2

    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.