Long Transaction on alter table



Have few questions about long transactions. I have to alter table to
modify 2 columns to increase the width of those columns. This table
has around 50M rows. Will it get long transaction ? I already ran it
once but, it appears that there was a long transaction in between,
right now I see Blocked:LONGTX, and when I see onstat -g ses it
appears it's rolling back that transaction, I see --RPX--, but it has
been like this for about 4 hrs now. Assuming that we wouldn't be able
to add more logs, what are the options to complete the modification.
Does running alter in exclusive mode help ? or altering table in begin
work; or is there any other better option ?

.



Relevant Pages

  • Re: "Invalid Cursor Error"
    ... ALTER TABLE is fine as long ... >> problem is and spending money on this seems absurd. ... Just plain simple Enterprise Manager. ... > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ...
    (microsoft.public.sqlserver.server)
  • Re: UPDATE and ALTER in transactions do not mix
    ... > I am trying to update a system by issuing an UPDATE and then an ALTER ... > a transaction I always get that the table is in use by another user. ... sensible to me that you can't ALTER a table that has a lock on it. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: UPDATE and ALTER in transactions do not mix
    ... > Jonathan Scott via AccessMonster.com wrote: ... >> be touched once inside of a single transaction? ... > What locking strategy are you using? ... Of course it works the other way round: the ALTER doesn't take out any ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Add a coulm in a table, after a specific column
    ... should be one big transaction. ... That or just restore a backup if there ... o Remove all "go" in the script, and wrap most statements in EXEC. ... before the ALTER TABLE statement put always some ...
    (comp.databases.ms-sqlserver)
  • Re: ALTER COLUMN
    ... begin transaction ... alter column column1 int not null ... >> Fld2 int NULL ...
    (microsoft.public.sqlserver.programming)