DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006

    Automate shutdown of Oracle Concurrent Managers then DB for backup

    Hi ,

    **Oracle 11i Apps , 9i DB , RH Linux 3 AS**

    Im looking at a script that will run using cron on a weekly basis at sometime during w/e after hours.

    I need this to shutdown the concurrent mgrs ( using adstpall.sh) , wait until these are down ( ps-ef | grep FNDLIBR) and then shutdown the database using (firstly) a shutdown normal , and if after a period of time , a shutdown immediate.

    After the db is backed up ( cold obviously ) I want to start the db up , then the conncurrent manages ( adstrtall.sh)

    Im not asking for much , am I ?

    Anyone else doing this?

    Any ideas?



  2. #2
    Join Date
    Sep 2002
    why not do a hot backup? - save all this hassle and not have the problems where it gets itself in a mess and doesnt go down / come up

  3. #3
    Join Date
    Mar 2004
    IA USA
    We are doing cold backup for our dev and testing system.
    The basic is like this:
    on db-tier:( we have concurrent processing on this db-tier)
    we schedule a corn job from root ( since we have two accounts;
    oracle and applmgr)
    1. use adstpall.sh to shutdown all the services as applmgr
    2. use stopora.sh to shutdown all the db listener, db and web
    from oracle
    3.do the copying job
    4. use startora.sh to start the database as oracle
    5. use adstrtal.sh

    on apps tier, this is simple. just stop and starat the sevices.


  4. #4
    Join Date
    Dec 2005
    1.# create the backup script
    $ cd /demo/oracle
    $ vi backup.sh

    # this is a sample backup script

    export ORACLE_SID=db01
    export ORACLE_HOME=/demo/oracle/db/9.0.1

    # stop the listener
    $ORACLE_HOME/bin/lsnrctl stop

    # shutdown the database
    $ORACLE_HOME/bin/sqlplus /nolog << EOF
    connect / as sysdba
    shutdown immediate

    # backup the datafiles and control files
    # modify the following commands to fit your backup strategy
    cd /demo/oracle/db/oradata
    tar -czvf db01.tar.gz db01

    # startup the database
    $ORACLE_HOME/bin/sqlplus /nolog << EOF
    connect / as sysdba

    # start the listener
    $ORACLE_HOME/bin/lsnrctl start

    # end of script

    2. Test the backup script

    # set the script permissions
    $ chmod 755 backup.sh

    # backup the database
    $ ./backup.sh

    # make sure you can recover the database with the backup

    3. Schedule to run the backup script everynight

    # edit the crontab
    $ crontab -e

    # add the following line
    00 01 * * * /demo/oracle/backup.sh
    # it schedules to run the backup script evertnight at 1:00 am
    # modify it to fit your backup strategy

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.