If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Shutdown immediate problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Jul 2003
Posts: 21
Shutdown immediate problem

Hi,

I have a problem while shutting down Oracle8i database.

Every morning the cronjob shuts down the database and takes the backup and starts it up again.

It works most of the time.
But what happens sometimes is that the database doesnt shutdown and keeps hanging.

I try to shutdown the database using the command:

SQL> shutdown immediate

When I see the trace file, I see this line in the file:

"SHUTDOWN: waiting for active calls to complete"

This line is repeated throught the file from the time that I gave the shutdown command.

Is it because too many oracle user processes are running at that time ??
Because on an average, over 100 users access the site simultenoulsy.

Or what else could be the reason that the database doesnt shutdown and keeps waiting forever ????


- Bikram.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Sep 2003
Location: Hanoi- Vietnam
Posts: 27
Sometime When have some transactions to long shutdown immediate will very slow to complete rollbacks.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Sep 2003
Location: Delhi
Posts: 15
To shut down at that very point of time u can issue "shutdown abort"...This will abort all the existing transactions and shutdown the instance...

cheers,
pinaki
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Sep 2003
Location: The Netherlands
Posts: 311
shutdown immediate hangs

According to calls on Oracle's Metalink, this problem might be caused by dead connections, which cannot be closed. Although 'SHUTDOWN IMMEDIATE' should close all connections, it looks like dead connections are not closed and the database waits for ever (or until you issue the 'SHUTDOWN ABORT' command).

In the cronjob, maybe you can see what connections are still open right before the shutdown statement, what state they're in, etc.
This way you can figure out what connections is causing the problem and see if it is the dead connection philosophy. If this is the case Oracle advises to use the Dead Connection Detection (DCD) feature of net8.

Maybe this is a solution for your problem.

Good Luck.
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Jul 2003
Posts: 21
Re: Shutdown immediate problem

When I read some of the mailing lists, I discover that the shutdown immediate problem is quite common.

The most common solution suggested to this problem is to do :

shutdown abort;
startup restrict;
shutdown immediate;

But it is also suggested to force a checkpoint before i issue a
"shutdown abort" command.

When we issue "shutdown abort" command, instant recovery is required at the next database startup.

Now when we give startup restrict command, will the database do recovery in the background by using the online redo log files ???

How much time should I wait for before I issue shutdown immediate command after issuing startup restrict since the database might be doing
instant recovery in hte background ????

Thanks for your help !!

- Bikram.









Quote:
Originally posted by bikramjeet77
Hi,

I have a problem while shutting down Oracle8i database.

Every morning the cronjob shuts down the database and takes the backup and starts it up again.

It works most of the time.
But what happens sometimes is that the database doesnt shutdown and keeps hanging.

I try to shutdown the database using the command:

SQL> shutdown immediate

When I see the trace file, I see this line in the file:

"SHUTDOWN: waiting for active calls to complete"

This line is repeated throught the file from the time that I gave the shutdown command.

Is it because too many oracle user processes are running at that time ??
Because on an average, over 100 users access the site simultenoulsy.

Or what else could be the reason that the database doesnt shutdown and keeps waiting forever ????


- Bikram.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Sep 2003
Location: The Netherlands
Posts: 311
Re: Shutdown immediate problem

Hi,

There's no saying how much time you should wait before issuing the shutdown immediate. It all depends on the size of the database, the number of redo logs that should be applied, the number of tablespaces, their size etc. The only way to know when a recovery (always performed in the background) is ready is to read the alert.log
This will show the results of the recovery and indicate whether a database is ready.
For as far as I know, issuing a shutdown immediate should not be a real problem for the database, while recovery will continue after the next startup. So in the case the database should be shutdown and hangs, issue the shutdown abort, do whatever is wanted (you shutted the database for a readson), startup restricted, wait for the recovery to complete and open the database for unrestricted use.

Better is to avoid the problem of an hanging shutdown immediate, by checking if any dead sessions exist and killing them before the shutdown immediate. Or, use Oracle Dead Connection capabilities to avoid dead connections.

hope this helps. Good luck.

Edwin
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On