DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: SHUTDOWN IMMEDIATE

  1. #11
    Join Date
    Jun 2002
    Posts
    64
    Hi Tomaz,

    Thanks!

    I think my question went into a different direction.

    The example I mentioned was to understand the ramification of using SHUTDOWN IMMEDIATE and TRANSACTIONAL in a production database.

    From this discussion, What i understand is that I should try to avoid the above two options! Right?

    Thanks again






  2. #12
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    Not right

    If application is using transactions _correctly_, then 'transactional' is first thing you should do.
    If it takes too long, then do 'immediate'. By the time you were waiting most transactions were probably completed, so you are just rolling back ones you don't have time to wait.

    Tomaz

  3. #13
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    re:
    What happens if a user keeps inserting and not doing a commit or rollback, will Oracle wait until he issues a commit or rollback?

    YES,
    Shutdown transactional WILL wait until a commit or rollback is issued.

    P.S. If you are unable to issue a shutdown immediate due to your application programmers code, then your programmers are NOT using commits correctly. A commit should be issued after the completion of a logical unit of work (i.e. Customer, etc...) which would allow the process to be restarted from where it was terminated.

    Shutdown immediate is necessary to use as the database will never shutdown (See example below)

    Four(4) users on the database...
    Cathy the client
    Dave the DBA
    Paul the programmer
    Tim the trouble maker

    1. Cathy the client shuts off her computer and goes home

    2. Paul the programmer locks his workstation leaving a sqlplus session active with no outstanding transactions and goes home.

    3. Dave the DBA logs off and goes home.

    4. Time the troublemaker locks his workstation leaving a sqlplus session open/logged in with uncommitted work in progress.

    ***
    Shutdown immediate is the only clean way to shutdown the database.

    Shutdown (NORMAL) will not work due to #'s 2 & 4(Active Sessions)

    Shutdown (TRANSACTIONAL) will not work due to #4 (Waiting for a commit or rollback)

    Shutdown (IMMEDIATE) is the correct method (All programs should commit based upon a logical unit of work)

    Shutdown (ABORT) well.... You know (Emergencies)





    [Edited by alapps on 07-24-2002 at 12:53 AM]

  4. #14
    Join Date
    Jun 2002
    Posts
    64
    Hi All,

    Thanks a lot for clearing the fog! Appreciate it.


    Cheers
    Najmal


  5. #15
    Join Date
    Jul 2002
    Posts
    13
    Hi! My opinion is:
    1. An important concept of an database is "atomic transaction". i.e. If operations are regarded as a transaction, they should be writing to a database in a "all or nothing" manner. Otherwise, there will be big problem not only during database shutdown, but also during server crash, client PC hangs, or network problem.

    Image an example that I am transferring money from your bank account to mine. It will be terrible if the system deduce money from your account and commit and then the system crash before they are added to my account. The money will be sublimed from this world.

    PL/SQL like that is considered has a bug and is unacceptable to industrial standard.

    2. You may think "shutdown transactional" a better way then "shutdown immediately". I agree with you in some way, but practically there may be problems. It depends what is the loading of your system and what is your purpose of shutdowning the databases.

    My OCP teacher told me that in a real life system, it is very difficult to find a slot that all users are inactive. Even you can find one, it may take a very long time, and you would miss the, say, backup windows if the DB are shutting down for cold backup.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width