Database shutdown immediate - time calculation ?

Hi,
Good Day.
did any one tried to calculate time the database would took to complete "shutdown immediate" command?
hope to have a healthy discussion..
Regards,
Muhammad Ahmad

Mohamed ELAzab wrote:
Hello Jonathan Lewis,
1-Please note that looking into the alert_sid.log is a good start as it will show if the smon process was dead according to the note:
Shutdown Normal or Shutdown Immediate Hangs. SMON disabling TX Recovery [ID 1076161.6]
I can see that that note is labelled: "Checked for relevance June 2009", but have you seen the garbage it suggests for temporary segments:
<ul>
Verify that temporary segments are decreasing
To verify that the temporary segments are decreasing have an active session
available in Server Manager or SQLPLUS during the SHUTDOWN IMMEDIATE. Issue the following
query to ensure the database is not hanging, but is actually perform extent
cleanup:
SVRMGR/SQL> select count(block#) from fet$;
COUNT(BLOC
+7+
SVRMGR/SQL> select count(block#) from uet$;
COUNT(BLOC
+402+
</ul>
For this to be true the temporary tablespace would have to be declared as dictionary managed, possibly even with contents = "PERMANENT" but it's so long since I've created a dictionary-managed TEMP that I can't be sure of the second point. I would be very cautious about trusting any document that started with such antiquated material - you can have no idea how much of its content might be (at best) deficient and (at worst) dangerously wrong.
3-to know the transactions that will be rolled back please read the note:
How to Check Why Shutdown Immediate Hangs? [ID 164504.1]
Same type of problem - "Checked for relevance: Mar 2010", starts with:
<ul>
Start Server Manager (or SQL*Plus for 8i or higher)
SVRMGRL> connect internal (or SYSDBA for 8i or higher)
SVRMGRL> select * from x$ktuxe where ktuxecfl = 'DEAD';
</ul>
Although x$ktuxe will show you transaction states from the undo segment headers, and this might show you recursive (or other special case) transactions that do not appear in v$transaction, I wouldn't trust a note that is based on 7.3 technology to be an appropriate reference document.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk

Similar Messages

  • Database Shutdown Some Times

    Dear All
    I have Installed Oracle Database 10G on Windows Server 2003
    But When I need Connect To The database I Discover it shutdown then I will Startup Again to Connect.
    Please I need help To see What Happen To Oracle Because its Online Database
    There is files In Oracle That I can Trace The Error or Any Thing To Help.
    Thanks In Advance.

    user8942603 wrote:
    Dear All
    I have Installed Oracle Database 10G on Windows Server 2003
    But When I need Connect To The database I Discover it shutdown then I will Startup Again to Connect.
    Please I need help To see What Happen To Oracle Because its Online Database
    There is files In Oracle That I can Trace The Error or Any Thing To Help.
    Thanks In Advance.Duplicate post. Please do not cross post
    Database Shutdown In Some Times

  • Database shutdown taking more time, is listener process a problem??

    Dear all,
    though its a general process to stop the listener before shutting down the database for cold backup. but is it so that if you don't stop the listener before giving shutdown immediate command, the shutdown process takes long time than normal expected time?
    because as per my understanding, the listener process is used just for the connection and when we give shutdown command the database automatically rejects any new connections. your valuable comments are required.

    No version, as usual, and the answer is version specific.
    Why is it so difficult to include those 4 digits?
    Dear all,
    though its a general process to stop the listener
    before shutting down the database for cold backup.
    but is it so that if you don't stop the listener
    before giving shutdown immediate command, the
    shutdown process takes long time than normal expected
    time? No. Must be a fairy tale without proof.
    You might need set job_queue_processes to 0 and aq_tm_processes to 0, but that has nothing to do with the listener.
    >
    because as per my understanding, the listener process
    is used just for the connection and when we give
    shutdown command the database automatically rejects
    any new connections. your valuable comments are
    required.--
    Sybrand Bakker
    Senior Oracle DBA

  • Shutdown immediate hangs and HVM of a database

    Hi,
    I have following questions,
    1. What are the possible causes of SHUTDOWN IMMEDIATE command hangs
    and doesnt responds.
    2. What do u mean by High Water Mark(HVM) of a database. Because when we
    give SHUTDOWN IMMEDIATE command there is message in alert log file
    mentioning the HVM of a database.
    3.Also is there any relationship between shutdown process taking long time to
    shutdown a database and HVM of a database.
    4. If the database instance is up for a long time then does it take long time to
    shutdown a instance.
    Thanks,
    Girish A

    Hello,
    for 1.) view Metalink Note:375935.1. Maybe you even get an error: "SHUTDOWN: Waiting for active calls to complete". This has nothing to do with HWM but with already logged on sessions. Immediate means new connections are not able to log in, existing connetions are not disconnected at once.
    for 2.) the HWM is the highest point to which datafiles have been filled up. This is the value to which you are able to shrink (if you desire to). View Metalink Note:1034330.6 for message "License high water mark" in alert.log at shutdown ("highest number of concurrent users sessions").
    Greets,
    Hannibal

  • Shutdown immediate taking time

    HI
    I m using oracle 10g release 2. on hpux itanium
    some of my database is taking longer time to shutdown more than 30 minutes. so usually i m doing
    startup force and than shutdown immediate... wat is the problem behind this and how can i resolve it plz suggest.

    A SHUTDOWN NORMAL will wait for sessions to disconnect. So, if you have application processes or users that do not disconnect, it will "hang". It is likely that this is causing your shutdown to delay. You could check the alert log file for messages about Oracle waiting for users to disconnect.
    A SHUTDOWN IMMEDIATE will kill active sessions, complete a rollback of transactions that are killed and then shutdown the database. If you are using a SHUTDOWN IMMEDIATE, this can take a long time if there are large active transactions (or many active transactions) that Oracle needs to rollback -- the rollback can take time. (Also, if there are very many connected sessions, Oracle will take time to disconnect all of them).
    A SHUTDOWN ABORT does a quick kill by shutting down the instance, without validating connected sessions. Rollback is automatically initiated by Oracle with the Instance Recovery at the STARTUP. The STARTUP can take slightly longer (in terms of seconds or a few minutes, generally) depending on the volume of Redo to be re-applied. Rollback is deferred to be executed after the OPEN.
    You could try a SHUTDOWN TRANSACTIONAL. However, this can still take a long time or "hang" if a user or application process (or multiple of them) has/have active transaction(s) and does/do not issue COMMITs.
    See the documentation on the SHUTDOWN command :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12042.htm#i2699551
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Scheduled shutdown immediate and full database export

    Hi all,
    The database is Oracle 10g.
    How to make a scheduled shutdown immediate and full database export ? I want to use a batch file for it so I can make a sheduled task from the windows control panel everyday at 2 am. So what to write in the batch file because I am a bit new to 10g ?
    Thank you very much

    >
    How to make a scheduled shutdown immediate and full database export ? I want to use a batch file for it so I can make a sheduled task from the windows control panel everyday at 2 am. So what to write in the batch file because I am a bit new to 10g ?No, you can't take logical backup after shutdown database.
    If you want to schedule the logical backup of your database, just you can refer from here
    Schema level
    http://mohamedazar.wordpress.com/2010/04/18/datapump-scheduler-for-schema-level/
    Full export
    http://mohamedazar.wordpress.com/2010/02/16/dbms-scheduler-for-data-pump/

  • If shutdown immediate hangs database waits one hour for shutdown abort

    we have schedules cold backup for our 11g database on redhat 5.3.
    there is a shell script written with shutdown immediate command.
    If database hangs during shutdown immediate database waits one hour for auto shutdown abort.
    but this happens once or twice in a month
    can we do this auto shutdown abort earlier than one hour ??

    user13376823 wrote:
    we have schedules cold backup for our 11g database on redhat 5.3.
    Since you're shutting down the database for cold backup so ensure it should be shutdown properly by shutdown or shutdown immediate cmd not by abort cmd.
    Consistent backup:-
    A backup taken when the database is mounted (but not open) after a normal shutdown. The checkpoint SCNs in the datafile headers match the header information in the control file. None of the datafiles has changes beyond its checkpoint. Consistent backups can be restored without recovery.
    http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1007616

  • Doubt about database point in time recovery using rman

    Hi Everyone,
    I have been practising various rman restore and recovery scenarios . I have a doubt regarding database point in time recovery using rman. Imagine i have a full database backup including controlfile scheduled to run at 10 PM everyday. today is 20th dec 2013. imagine i want to restore the database to a prior point in time ( say 18th dec till 8 AM). so i would restore all the datafiles  from 17th night's backup and apply archives till 8 AM of 18th dec . in this scenario should i restore the controlfile too from 17th dec bkp ( i am assuming yes we should ) or can we use the current controlfile ( assuming it is intact). i found the below from oracle docs.
    Performing Point-in-Time Recovery with a Current Control File
    The database must be closed to perform database point-in-time recovery. If you are recovering to a time, then you should set the time format environment variables before invoking RMAN. The following are sample Globalization Support settings:
    NLS_LANG = american_america.us7ascii
    NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"
    To recover the database until a specified time, SCN, or log sequence number:
    After connecting to the target database and, optionally, the recovery catalog database, ensure that the database is mounted. If the database is open, shut it down and then mount it:
    2.  SHUTDOWN IMMEDIATE;
    3.  STARTUP MOUNT;
    4. 
    Determine the time, SCN, or log sequence that should end recovery. For example, if you discover that a user accidentally dropped a tablespace at 9:02 a.m., then you can recover to 9 a.m.--just before the drop occurred. You will lose all changes to the database made after that time.
    You can also examine the alert.log to find the SCN of an event and recover to a prior SCN. Alternatively, you can determine the log sequence number that contains the recovery termination SCN, and then recover through that log. For example, query V$LOG_HISTORY to view the logs that you have archived. 
    RECID      STAMP      THREAD#    SEQUENCE#  FIRST_CHAN FIRST_TIM NEXT_CHANG
             1  344890611          1          1      20037 24-SEP-02      20043
             2  344890615          1          2      20043 24-SEP-02      20045
             3  344890618          1          3      20045 24-SEP-02      20046
    Perform the following operations within a RUN command:
    Set the end recovery time, SCN, or log sequence. If specifying a time, then use the date format specified in the NLS_LANG and NLS_DATE_FORMAT environment variables.
    If automatic channels are not configured, then manually allocate one or more channels.
    Restore and recover the database.
      The following example performs an incomplete recovery until November 15 at 9 a.m. 
    RUN
      SET UNTIL TIME 'Nov 15 2002 09:00:00';
      # SET UNTIL SCN 1000;       # alternatively, specify SCN
      # SET UNTIL SEQUENCE 9923;  # alternatively, specify log sequence number
      RESTORE DATABASE;
      RECOVER DATABASE;
    If recovery was successful, then open the database and reset the online logs:
    5.  ALTER DATABASE OPEN RESETLOGS;
    I did not quiet understand why the above scenario is using current controlfile as the checkpoint scn in the current controlfile and the checkpoint scn in the datafile headers do not match after the restore and recovery. Thanks in Advance for your help.
    Thanks
    satya

    Thanks for the reply ... but what about the checkpoint scn in the controlfile . my understanding is that unless the checkpoint scn in the controlfile and datafiles do not match the database will not open. so assuming the checkpoint scn in my current controlfile is 1500 and i want to recover my database till scn 1200. so the scn in the datafiles (which is 1200) is not not matching with the scn in the controlfile(1500). so will the database open in such cases.
    Thanks
    Satya

  • Database shutdown problem

    Hi,
    My database takes quite a lot of time in shutting down, when I do normal shutdown.
    Pls help
    vip

    Hi Aman,
    F. Munoz Alvarez wrote:
    This is because Oracle terminates all sessions and does a rollback on all.Francisco,
    What does it mean by rollback here? So if I would kick in really big transaction and Oracle is shutting down, it will be rolling back my transcton? I don't think so. > My transaction info would be cleared immediately. Is there any way that I can see this happening ?
    Aman....Take a look in the Oracle Docs:
    - http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref589
    Immediate database shutdown proceeds with the following conditions:
    - No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.
    - Any uncommitted transactions are rolled back. (If long uncommitted transactions exist, this method of shutdown might not complete quickly, despite its name.)
    - Oracle Database does not wait for users currently connected to the database to disconnect. The database implicitly rolls back active transactions and disconnects all connected users.
    The next startup of the database will not require any instance recovery procedures.
    Transactional database shutdown proceeds with the following conditions:
    - No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.
    - After all transactions have completed, any client still connected to the instance is disconnected.
    - At this point, the instance shuts down just as it would when a SHUTDOWN IMMEDIATE statement is submitted.
    The next startup of the database will not require any instance recovery procedures.
    A transactional shutdown prevents clients from losing work, and at the same time, does not require all users to log off.
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com
    Sorry by the delay to answer, I'm having some issues with my internet connection :(

  • Restrict shudown database for a time interval

    Hi,
    I an using oracle10g in AIX..
    Can i restrict the shutdown operation within a time intervall....say for eg: "Shutdown immediate" should not be accepted by sqlplus, if it is issued after 10am and before 6:00Pm....
    Regards,
    Jibu

    why do you need something like this ? I am not sure but maybe a event trigger "BEFORE SHUTDOWN" can do that if you raise an application in it. like:
    create or replace trigger shut_trig before shutdown on database
        begin
                if NOT sysdate between trunc(sysdate) - 1 + (18/24) and trunc(sysdate) + 10 /24 then
                   RAise_application_error(-20000, 'you can not shutdown database');
                end if;
        end;not tested. I am not sure this code can work. just an idea

  • Database shutdown lock...

    Hi all
    I want to shutdown my database but it's waiting and doesn't shutdown ...
    What may be the reason???
    Thanks...

    This depends on the amount of transaction information it has to undo. When doing shutdown immediate all the uncommitted transactions get rolledback and because at the time when you are giving the command shutdown immediate there might be so many uncommitted transactions in the database that it may take long time before shutting down the database. So the only thing that could happen for you is that try to make all users commit all the transactions before shutting down the instance.

  • Is it safe to control c out of a shutdown immediate?

    development database
    10.1.0.3
    solaris
    I did a shutdown immediate and it is taking time to shut down. something is probably running. I should have checked first and could n ot. I tried sqlplus / as sysdba to create another session and 10.1.0.3 is too old to do that while shutting down.,
    is it safe to control c out of this shutdown
    shutdown abort
    startup
    shutdowm immediate
    startup
    or might I corrupt the database?
    I need to bounce this irregardless of what is running.

    Hi Anantha,
    slight correction: uncommitted transactions are not rolled back during the shutdown abort. But they are rolled back during the next startup of the instance during the crash recovery phase. So at the end, the database looks exactly the same as after a shutdown immediate-startup sequence. That is, if you have all the online logfiles in place needed for the crash recovery.
    Kind regards
    Uwe

  • Database Shutdown

    HI,
    There was long update query which was fired on the database, it was taking nearly 5 days to complete. So we killed the update.
    Now, the rollback is happening. Can I shutdown the database when the rollback is happening or shutdown abort.
    Will that leave the database in an inconsistent mode.

    halfMarathonMan wrote:
    I agree with the previous posts but do keep in mind that "shutdown abort" is one of the ungraceful shutdowns documented by Oracle.
    * SHUTDOWN NORMAL. The database waits for all users to disconnect, prohibits new connects, then closes and dismounts the database, then shuts down the instance.
    * SHUTDOWN IMMEDIATE. Cancels current calls like a system interrupt, and closes and dismounts the database, then shuts down the instance. PMON gracefully shuts down the user processes. No instance recovery is required on startup.
    * SHUTDOWN ABORT. This doesn’t wait for anything. It shuts the database down now. Instance recovery will probably be required on startup. You should escalate to this by trying the other shutdowns first.All of that rollback is going to have to be applied at some point. If you let it run before shutdown, fine. If you shutdown normal, the rollback will be applied before the shutdown completes. If you shutdown abort, the rollback will be applied as part of crash recovery the next time you start up, and the database won't open until the crash recovery is complete. No matter what you choose, oracle will handle it, and you will wait for the rollback to complete.

  • Shutdown immediate won't work, Must abort to switch to SunCluster standby

    Customer has a Solaris Clusterware, The customer sees the semtimedop() system call returning EAGAIN when running "shutdown immediate" on their database on one cluster node. This is expected when the shared resource that the semaphore is protecting is unavailable. The shared resource is only being used by Oracle processes, so we need to know what the resource is and what the other processes are doing with it. MOS doc 760968.1 isn't helpful. A Solaris crash dump taken when the database shutdown problem was occurring showed no signs of an OS issue so database assistance is needed.
    We have tried to capture the following trace, but the trace is empty , and we 're stuck since then.
    SQL> alter session set events '10046 trace name context forever,level 12';
    SQL> alter session set events '10400 trace name context forever, level 1';
    SQL> shutdown immediate;

    don't you think it is about time you upgraded to something that hasn't been out of support since 2007 (almost 6 years ago...???). Hopefully you don't have any CC information stored in that db as there has not been any security updates since before it went to de-support.
    What I would like to know is how did you even get 9i to install on Solaris 10? IIRC, that is not even a supported OS/Oracle version configuration. As for your current problem,
    http://www.lmgtfy.com/?q=oracle+9i+suncluster+failover
    http://docs.oracle.com/cd/E19787-01/820-2574/gctbk/index.html

  • Wrapper PL/SQL to shutdown immediate command

    Hi,
    I am working on 10g and 11g database. I want to check if anyone have created a wrapper script on top of command Shutdown immediate?
    Reason: I want to use a pl/sql X that would give me an option to confirm to proceed the shutdown process. I was thinking about a wrapper pl/sql, as shutdown immediate could be dangerous when working on multiple prod database screens. I am using putty.
    DB Versions: 10gR2 and 11gR2.
    SQL> x
    Do you want to shutdown down (y/n): y
    Shutting down database
    I have heard about the trigger -before-shutdown-trigger. Any thoughts would be helpful.
    Cherrish Vaidiyan

    Let's assume that the risk of error is high. How does prompting a user to enter "y" reduce that risk.
    If I think I'm connected to db1 and I want to shut down db1 but I'm really connected to db2, I'm going to reflexively answer "y" to the prompt. It's very unlikely that the prompt is going to cause me to stop and consider what database I'm really connected to. The prompt is going to very quickly become white noise where I just reflexively type in "y" without thinking. Just like a user interface that pops up "Are you sure" dialog boxes all the time, the user will very quickly stop seeing the text of the message and whatever benefit you gained from the alerts will be lost.
    On the other hand, there are lots of things that one can do to reduce the risk of error
    - As has been suggested, you shouldn't be connecting AS SYSDBA unless you absolutely have to. If you happen to type "shutdown immediate" when you're connected to db2, you'll get a privileges error rather than shutting down the wrong database. Note that putting things like this into scripts can easily backfire and make errors more likely because you'll be tempted to have the script connect AS SYSDBA and eliminate the benefit of having your sessions normally run as a less privileged user. In fact, some of the best DBAs I've seen would have their login script issue a `SET TRANSACTION READ ONLY` when they connected just so that they had to make a conscious effort to allow their session to change data.
    - There are all sorts of ways to make it obvious on the command line what database you're connected to. For example, I've seen plenty of DBAs that have their SQL*Plus command line changed to include the name of the database. People configure their telnet client (i.e. PuTTY) to have different background colors for different databases (i.e. red for production, yellow for test, green for development). That is generally much more effective than a prompt because it's far more likely that someone will get into the habit of checking (and double-checking and triple-checking) the background color, the database name on the prompt, etc. before issuing commands.
    - General DBA practice would suggest that having two different sessions open at once where you're logged in AS SYSDBA in both is extremely problematic. It is extremely unlikely that you'd ever want that to happen-- a DBA should be doing one thing at a time and certainly only one thing that involves SYSDBA access.
    Justin

Maybe you are looking for

  • Install web dispatcher on two different domain

    Hi Everybody,   I'm going to install web dispatcher on DMZ, that's not the same domain as Portal domain, but it cannot realize the host name that I insert for "rdisp/mshost" I'm guessing the problem is becuase they are in different domains, Do you ha

  • VBA problem with SAP BPC report

    Hello I have an EVDRE() SAP BPC report where one of the member id selection is derived using a VBA script. The problem I'm having is when I click on expand and refresh icon, the member id changes to #Value and the expansion and refresh fails as #Valu

  • Reg Inter compnay Transactions

    Hi All, I know the process of intercompoany transactions,At OBYA we  have to link between two company codes and assign clearing accounts,so far we r doing intercompany transaction through FB60 & FB70. Kindly give me the inputs how to process intercom

  • Transferring itunes for windows to a new Mac

    hi, i will be picking up a mac mini, and wanted to know an easy way to transfer my itunes purchases from Windows to the mini, and sync my ipod, iphone 3G and ipad

  • How to use a compressor to fix the sound of a 2 track live recording?

    Can anyone show me the basics - or where to look on the internet? I have some live recordings from a gig - in stereo. you can't hear the acoustic bass - and the sax and trumpet are way too loud - unfortunately - it was recorded direct to 2 track. I k