Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Shutdown hangon.

Re: Shutdown hangon.

From: Howard J. Rogers <howardjr_at_www.com>
Date: Fri, 27 Oct 2000 20:30:25 +1000
Message-ID: <39f94b80@news.iprimus.com.au>

Comments below
HJR

--
--------------------------------------------------------------------------
Opinions expressed are my own, and not those of Oracle Corporation
Oracle DBA Resources:               http://www.geocities.com/howardjr2000
--------------------------------------------------------------------------

"Kim,Yongjun" <kjun1017_at_shmail.hanarotel.co.kr> wrote in message
news:hJ8K5.19$We3.849_at_news.hananet.net...

> Dear,
> According your trace file and your command, there was some long
transaction
> or pending/waiting transaction.
> So 'shutdown immediate' waiting until that mysterious transaction ending.
> It can be casued by some user didnot commit his transaction or sessions.
>
No it can't. A shutdown immediate boots all users off the system without warning. It does not sit there waiting for Users to commit or terminate their own sessions. The delay in a shutdown immediate (I've seen one take 6 hours) is because, having booted the users off, Oracle then rolls back whatever transactions were pending at the time of the shutdown command being issued. If you have a bezillion pending transactions that thus need to be rolled back, you can expect the shutdown not to happen for some time.
> In my case, I should try to find which session and the owner.
> And if it doesn;t matter to cancel/rollback, I use below step to stop DB:
> 1. shutdown abort
> 2. startup normal
> 3. shutdown immediate
>
You really ought to avoid shutdown aborts (or simply terminating the NT services, which amounts to the same thing by default). The problem with a shutdown abort is that it works simply by shredding the Instance: there's no rollback of pending transactions, or a final checkpoint of the data files (both of which happen in a shutdown immediate). It is the functional equivalent of simply switching your server off, and I'm sure you wouldn't normally recommend that approach. Technically, a shutdown abort is not going to throw Oracle too much: on subsequent startup, Oracle will detect the inconsistent state of the database and initiate Instance Recovery -which involves replaying all the pending transactions, and then rolling them back when it discovers they were never committed. Despite a couple of nice tweaks and features, this process can still take hours (I've seen a subsequent startup take 3 hours). In neither case will you lose committed data, so neither is particularly 'dangerous'. However, in general, it is usually more critical to get a database *up* quickly -shutdowns can usually take as long as necessary, hence immediate is far more preferable under normal circumstances. I've only ever issued a shutdown abort in real life once: when the power cables to a building were sliced through by road workers, and we only had a half-hour UPS -the assurance of a quick shutdown was more important than worrying about subsequent startup time. Incidentally, regarding the original poster's questions -the size of the database is irrelevant for determining the speed of a shutdown immediate... far more significant is the amount of pending *transactions*. On a physically "small" database, it is perfectly possible to have hundreds of connections, all busy doing thousands of transactions. Regards HJR
> I hope this can help you.
> Regards,
> "David Wang" <yuhang.wang_at_pek1.siemens.com.cn> wrote in message
> news:8tb3is$hpg$1_at_news.mch.sbs.de...
> > Dear all,
> >
> > Yesterday, When I use the command -- shutdown immediate, the database is
> > hangon for more than one hour. The database is very small even 100MB.
> > Although I stop it by manually stop the basic service using the service
icon
> > in the control pane, I would like to know what is the reason and whether
it
> > will be damaged to my database, the following content is abstract from
the
> > trace file. Thanks for any responce to help me understand this trace
file
> > and the question I metioned,
> >
> > "
> > Dump file D:\orant\RDBMS80\trace\ORA01844.TRC
> > Thu Oct 26 08:27:59 2000
> > ORACLE V8.0.5.0.0 - Production vsnsta=0
> > vsnsql=c vsnxtr=3
> > Windows NT V5.0, OS V8.147, CPU type 586
> > Oracle8 Release 8.0.5.0.0 - Production
> > PL/SQL Release 8.0.5.0.0 - Production
> > Windows NT V5.0, OS V8.147, CPU type 586
> > Instance name: orcl
> >
> > Redo thread mounted by this instance: 1
> >
> > Oracle process number: 17
> >
> > pid: 734
> >
> >
> > *** SESSION ID:(15.13) 2000.10.26.08.27.58.997
> > SHUTDOWN: waiting for active calls to complete.
> > *** 2000.10.26.08.33.02.954
> > SHUTDOWN: waiting for active calls to complete.
> > "
> >
> >
> >
>
>
Received on Fri Oct 27 2000 - 05:30:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US