I am using Entity Framework 6.1.1. The database has three million records; migration has to change the precision of a column of type
decimal. The migration timeout window is set to the maximum value,
CommandTimeout = Int32.MaxValue;
I was testing this scenario on Azure SQL Database. After trying for around 90 minutes, it ends up with an exception, but no migration done.
The session has been terminated because of excessive transaction log space usage. Try modifying fewer rows in a single transaction.
My questions are:
Is it the expected behavior to take more time for migration of this type on a huge DB? (Because after changing the precision it has to convert the existing value and save it back, and it has to be repeated on 3 million records)
How to resolve this? I don't think we can have migration in chunks of transactions.