c# - Updating big table inside migration -
i've created migration update values in 1 column. migration looks follow:
public partial class updatestatuses : dbmigration { public override void up() { var updatesql = @" begin update article set status = case when status <> -1 status + 1 else status end, statusprev = case when statusprev <> -1 statusprev + 1 else statusprev end; end;"; sql(updatesql, true); } public override void down() { var updatesql = @" begin update article set status = case when status <> -1 status - 1 else status end, statusprev = case when statusprev <> -1 statusprev - 1 else statusprev end; end;"; sql(updatesql, true); } }
migration works fine on smaller datasets, table migration designed run on has ~11m of records. when i'm running it throw me such exception:
engine task errororacle.manageddataaccess.client.oracleexception (0x00001ff1): ora-08177: can't serialize access transaction ora-06512: @ line 3
can can this?
Comments
Post a Comment