Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

fast kill/rollback
I have just killed a transaction and it says it's going to take about 20
hours to roll the change back.  Is there such a thing as a "fast kill"?  I
don't care about rolling this back - I just want it to stop.  The process is
blocking my users and I need this process killed sooner than 20 hours from
now.  I also don't understand how/why a process that had run for 9 hours
could take 20 hours to rollback.  It doesn't really make sense to me.

Thanks in advance.

Andre



Report this thread to moderator Post Follow-up to this message
Old Post
Andre
12-30-05 06:23 PM


Re: fast kill/rollback
Hi

Generally, if a transaction took 9 hours, you can expect a rollback to take
12-24 hours (1.5-3 times the forward time).

It has to read the original row from the transaction log, and apply it back
to the database. This is very IO intensive. I hope your transaction log is
on a separate physical drive/LUN.

It does not help to stop the SQL Server service as on startup, it will do
the rollback and it will take the same time.

You should never have very long transactions, as it can take a long time to
rollback as anything can happen over such a long period (power, network
server problems)

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"Andre" <no@spam.com> wrote in message
news:uinG%23kWDGHA.272@TK2MSFTNGP10.phx.gbl...
>I have just killed a transaction and it says it's going to take about 20
>hours to roll the change back.  Is there such a thing as a "fast kill"?  I
>don't care about rolling this back - I just want it to stop.  The process
>is blocking my users and I need this process killed sooner than 20 hours
>from now.  I also don't understand how/why a process that had run for 9
>hours could take 20 hours to rollback.  It doesn't really make sense to me.
>
> Thanks in advance.
>
> Andre
>



Report this thread to moderator Post Follow-up to this message
Old Post
Mike Epprecht \(SQL MVP\)
12-30-05 06:23 PM


Re: fast kill/rollback
> Is there such a thing as a "fast kill"?  I don't care about rolling this
> back - I just want it to stop.

The only way to avoid the rollback is to restore from backup.

--
Happy Holidays

Dan Guzman
SQL Server MVP

"Andre" <no@spam.com> wrote in message
news:uinG%23kWDGHA.272@TK2MSFTNGP10.phx.gbl...
>I have just killed a transaction and it says it's going to take about 20
>hours to roll the change back.  Is there such a thing as a "fast kill"?  I
>don't care about rolling this back - I just want it to stop.  The process
>is blocking my users and I need this process killed sooner than 20 hours
>from now.  I also don't understand how/why a process that had run for 9
>hours could take 20 hours to rollback.  It doesn't really make sense to me.
>
> Thanks in advance.
>
> Andre
>



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Guzman
12-30-05 06:23 PM


Re: fast kill/rollback
bummer.

In that case, maybe I should ask for advice on how to do this.  I'm trying
to add a new column to a table that has 9 cols and 34 million records.  I'm
trying to add an identity col called RowID, using alter table.  Is there a
better way to do this?  Should I drop all indexes before running this
command?

Thanks, Andre



Report this thread to moderator Post Follow-up to this message
Old Post
Andre
12-31-05 01:23 AM


Re: fast kill/rollback
Even on the worst hardware I can think of this should not take 9 hours to
do.  Most likely you were blocked and it wasn't doing anything.  But in any
case you might want to BCP out the data, create a new table just the way you
need with no indexes. BCP the data back in (you will probably need a format
file since the structure will be different) and recreate the indexes.  That
way you can get a minimally logged load if you do the BCP or Bulk Insert
properly.

--
Andrew J. Kelly  SQL MVP


"Andre" <no@spam.com> wrote in message
news:%23$vQBzXDGHA.2036@TK2MSFTNGP14.phx.gbl...
> bummer.
>
> In that case, maybe I should ask for advice on how to do this.  I'm trying
> to add a new column to a table that has 9 cols and 34 million records.
> I'm trying to add an identity col called RowID, using alter table.  Is
> there a better way to do this?  Should I drop all indexes before running
> this command?
>
> Thanks, Andre
>



Report this thread to moderator Post Follow-up to this message
Old Post
Andrew J. Kelly
12-31-05 01:23 AM


Re: fast kill/rollback
Another method besides the BCP method Andrew suggested is to create a new
table using SELECT INTO, creating the new column using the IDENTITY
function.  This will also be minimally logged in the SIMPLE recovery model.
You can then drop the old table and recreate constraints and indexes.

--
Happy Holidays

Dan Guzman
SQL Server MVP

"Andre" <no@spam.com> wrote in message
news:%23$vQBzXDGHA.2036@TK2MSFTNGP14.phx.gbl...
> bummer.
>
> In that case, maybe I should ask for advice on how to do this.  I'm trying
> to add a new column to a table that has 9 cols and 34 million records.
> I'm trying to add an identity col called RowID, using alter table.  Is
> there a better way to do this?  Should I drop all indexes before running
> this command?
>
> Thanks, Andre
>



Report this thread to moderator Post Follow-up to this message
Old Post
Dan Guzman
12-31-05 01:23 AM


Re: fast kill/rollback
I thought about that one too but wondered about the logging.  I'll give that
a try tonight and see how it goes.

I also do think there was some blocking going on.  I'm going to stop SQL
Agent tonight before starting.

Thanks again,

Andre


"Dan Guzman" <guzmanda@nospam-online.sbcglobal.net> wrote in message
news:OO%23OJIYDGHA.3992@TK2MSFTNGP12.phx.gbl...
> Another method besides the BCP method Andrew suggested is to create a new
> table using SELECT INTO, creating the new column using the IDENTITY
> function.  This will also be minimally logged in the SIMPLE recovery
> model. You can then drop the old table and recreate constraints and
> indexes.
>
> --
> Happy Holidays
>
> Dan Guzman
> SQL Server MVP
>
> "Andre" <no@spam.com> wrote in message
> news:%23$vQBzXDGHA.2036@TK2MSFTNGP14.phx.gbl... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Andre
12-31-05 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 03:59 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006