problem shuting down a database
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: problem shuting down a database

  1. #1
    Join Date
    Mar 2003
    Location
    Sofia, Bulgaria
    Posts
    64

    problem shuting down a database

    I have written little script to shutdown my database, copy the files to remote ftp and start the database. When i run it manually from console everything is fine. But when the script runs tru cron the database doesn't shut down. operating system AIX. database 8.1.5
    here is the script

    #!/usr/bin/ksh

    # spira bazata
    svrmgrl << EOF
    connect / as sysdba
    shutdown immediate
    EOF

    # kopira failovete ot glavnata direktoria
    cd /u02/oradata/O8I5A
    ftp -n< open 10.*.*.*
    user oracle ******
    put Ukazatel.dbf
    put VitosaLs.dbf
    put control01.ctl
    put control02.ctl
    put drsys01.dbf
    put initO8I5A.ora
    put orapwO8I5A
    put rbs01.dbf
    put redo01.log
    put redo02.log
    put redo03.ora
    put redo04.ora
    put s4tbsp.dbf
    put system01.dbf
    put temp01.dbf
    put users01.dbf
    put users02.dbf
    quit
    EOF2

    # kopira init faila i passwd faila
    cd /u01/app/oracle/product/8.1.5/dbs
    ftp -n< open 10.*.*.*
    user oracle ******
    put initO8I5A.ora
    put orapwO8I5A
    quit
    EOF3

    # kopira failovete ot drugata direktoria
    cd /usr/oracle
    ftp -n< open 10.*.*.*
    user oracle ****
    cd usr
    put control01.ctl
    put control02.ctl
    put indx2.dbf
    put redo01.log
    put redo02.log
    put redo03.ora
    put redo04.ora
    quit
    EOF4

    #kopirane na alertlog
    cd /u01/app/oracle/admin/O8I5A/bdump
    ftp -n< open 10.*.*.*
    user oracle ******
    put alert_O8I5A.log
    EOF5
    rm alert_O8I5A.log

    # vdiga bazata
    svrmgrl << EOF6
    connect / as sysdba
    startup
    EOF6


    any suggestions and ideas?

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    well you have to load your environment variables, dont think you have that in your script

  3. #3
    Join Date
    Mar 2003
    Location
    Sofia, Bulgaria
    Posts
    64
    With the enviroment variables is working. 10x

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