>> Delete No. 63992 article
No. cron 에 관한사항 문의

등록 2003-01-06 11:02:00 By localhost     조회 5
이름 박성호    

		문제: 오라클 사용자(oracle.dba)로 DB Backup을 하기 위해서 Cron을 실행시
키려 하는데, export를 하지를 못합니다. 디렉토리는 만들어집니다.디렉토리
를 만든후 exp 부터 실행이 되질 않습니다. 그런
데, /oracle8/day_export_backup.cron 파일을 cron으로 동작을 시키지 않
고, 그냥 ./oracle8/day_export_backup.cron 실행을 시켰을 경우에는 무리없
이 잘 동작을 합니다. 고수님들의 많은 답변 부탁드립니다. 
 Mail 메시지 :
   /var/mail/oracle
        produced the following output:
        /oracle8/day_export_backup.cron: exp: not found
       /oracle8/day_export_backup.cron: exp: not found
       /oracle8/day_export_backup.cron: exp: not found
        mv: cannot access file1.dmp
       mv: cannot access file2.dmp
       mv: cannot access file3.dmp
 /var/cron/log 파일 내용
     오라클 사용자 내용
     >  CMD:/oracle8/day_export_backup.cron
    >  oracle 9069 c Mon Jan  6 09:14:00 2003
    <  oracle 9069 c Mon Jan  6 09:14:00 2003 rc=2
   
    >  CMD:/oracle8/day_export_backup.cron
    >  oracle 9150 c Mon Jan  6 09:20:00 2003
    <  oracle 9150 c Mon Jan  6 09:20:00 2003 rc=2
   
    >  CMD:/oracle8/day_export_backup.cron
    >  oracle 10092 c Mon Jan  6 10:15:00 2003
    <  oracle 10092 c Mon Jan  6 10:15:00 2003 rc=2
     root cron 내용
     >  CMD:/usr/lib/uucp/uudemon.poll
    >  uucp 9629 c Mon Jan  6 10:00:00 2003
    <  oracle 9628 c Mon Jan  6 10:00:00 2003 rc=1
    <  uucp 9629 c Mon Jan  6 10:00:00 2003
    >  CMD:/usr/lib/uucp/uudemon.hour
    >  uucp 9959 c Mon Jan  6 10:11:00 2003
    <  uucp 9959 c Mon Jan  6 10:11:00 2003
 /oracle8/day_export_backup.cron 파일 내용
        #!/bin/sh
        PATH=$PATH:$ORACLE_HOME/bin; export PATH
        BACKUPDIR=`date +%Y%m%d`
         #. /oracle8/day_export_backup.cron/.profile > /dev/null ;
       #BACKUPDIR=/oracle8/$BACKUPDATE
        # make directory
       mkdir /oracle8/$BACKUPDIR
        #DB export
       exp userid=file1/file1 direct=y owner=file1 file=file1.dmp
       exp userid=file2/file2 direct=y owner=file2 file=file2.dmp
       exp userid=file3/file3 direct=y owner=file3 file=file3.dmp
        mv file1.dmp /oracle8/$BACKUPDIR
       mv file2.dmp /oracle8/$BACKUPDIR
       mv file3.dmp /oracle8/$BACKUPDIR
 crontab -e 의 내용
        15 10 * * * /oracle8/day_export_backup.cron
  시스템 환경
   OS : SunOS hostname 5.6 Generic_105181-19 sun4u sparc SUNW,Ultra-60
  DB : Oralce 8.1.5
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved