Pak Edwin,

Untuk jalan exp, user tidak perlu harus oracle. bisa pake root user.
Yang penting environment variablenya ter- set dengan betul.

Kalo mau tetap dengan crontab, yah bisa diusahakan supaya root bisa export
database.

Kalo mau dengan scheduler, saya anjurkan buat script simple yang cuman
create a file.
Lalu coba create job yang execute shell script tersebut.
Try to make sure your scheduler is set up properly first.

Cheers,

On 15/02/2008, Edwin Setiawan <[EMAIL PROTECTED]> wrote:
>
>   Terima kasih pak yoel,
> Saya adalah newbie pak di oracle. Sebelumnya saya biasa pake Informix.
> Saya membuat script di shell seperti dibawah ini.
> Kalau dengan user oracle, script ini jalan pak.
> Masalahnya adalah, script ini harus jalan dengan user root.
> Karena akan saya taruh di cron, pak.
> KArena saya berencana setelah backup pakai exp, langsung dialakukan remote
> tar dengan mounting
> Padahal untuk jalanin command exp, kita harus pake user oracle.
>
> Akhirnya saya akalin seperti ini, untuk expnya saya pakai em, sedang
> mountingnya pakai cron.
> Masalahnya pada saat saya lakukan dengan job scheduler, error yang muncul
> adalah :
> Details
> ORA-27369: job of type EXECUTABLE failed with exit code: 255
> STANDARD_ERROR="execve: Exec format error"
>
> Atau mungkin, bagaimana caranya untuk kasus seperti saya? Mungkin rekans
> yang lebih berpengalaman
> Dapat membantu saya…..
>
> PATH=$PATH:$HOME/bin
> export PATH
> unset USERNAME
> ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
> ORACLE_BASE=/u01/oracle
> ORACLE_SID=orcl
> export ORACLE_HOME ORACLE_BASE ORACLE_SID
> PATH=$PATH:$HOME/bin:$ORACLE_HOME:$ORACLE_HOME/bin
> umask 022
>
> z3=`date|cut -c1-3`
> x1=`date +%D|cut -c1-2`
> x2=`date +%D|cut -c4-5`
> x3=`date +%D|cut -c7-8`
> x4=$x3$x1$x2
> date > /opt/backup/bu.log
> case $z3 in
> Mon)rm -rf /opt/backup/senin/oracle.dmp >>/opt/backup/data/bu.log 2>&1;;
> Tue)rm -rf /opt/backup/selasa/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Wed)rm -rf /opt/backup/rabu/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Thu)rm -rf /opt/backup/kamis/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Fri)rm -rf /opt/backup/jumat/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> *)rm -rf /opt/backup/sabtu/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> esac
> sleep 30
> case $z3 in
> Mon)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/senin/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Tue)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/selasa/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Wed)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/rabu/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Thu)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/kamis/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> Fri)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/jumat/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> *)/u01/oracle/product/10.2.0/db_1/bin/exp reins/oracle
> file=/opt/backup/sabtu/oracle.dmp >>/opt/backup/bu.log 2>&1;;
> esac
> date >> /opt/backup/bu.log 2>&1
> (cd /opt/backup/senin;chmod 777 *)
> (cd /opt/backup/selasa;chmod 777 *)
> (cd /opt/backup/rabu;chmod 777 *)
> (cd /opt/backup/kamis;chmod 777 *)
> (cd /opt/backup/jumat;chmod 777 *)
> (cd /opt/backup/sabtu;chmod 777 *)
> date >> /opt/backup/bu.log
> ##echo "Doing backup another machine .........." >> /opt/backup/bu.log
> ##/etc/mount oas:/datafile/bekap /sem
> ##sleep 3
> #############
> ##x5="/data/senin"
> ##if [ -d $x5 ]
> ##then
> ## case $z3 in
> ## Mon)(cd /sem/senin;rm -rf oracle.dmp);;
> ## Tue)(cd /sem/selasa;rm -rf oracle.dmp);;
> ## Wed)(cd /sem/rabu;rm -rf oracle.dmp);;
> ## Thu)(cd /sem/kamis;rm -rf oracle.dmp);;
> ## Fri)(cd /sem/jumat;rm -rf oracle.dmp);;
> ## esac
> ## case $z3 in
> ## Mon)(cd /opt/backup/senin;tar cvf - .)|(cd /sem/senin;tar xvf -);;
> ## Tue)(cd /opt/backup/selasa;tar cvf - .)|(cd /sem/selasa;tar xvf -);;
> ## Wed)(cd /opt/backup/rabu;tar cvf - .)|(cd /sem/rabu;tar xvf -);;
> ## Thu)(cd /opt/backup/kamis;tar cvf - .)|(cd /sem/kamis;tar xvf -);;
> ## Fri)(cd /opt/backup/jumat;tar cvf - .)|(cd /sem/jumat;tar xvf -);;
> ## esac
> ##else
> ## echo " Tar Harian ke busvr Error " >> /opt/backup/bu.log
> ##fi
> ##/etc/umount /sem
> date >> /opt/backup/bu.log 2>&1
>
> ________________________________________
> From: [email protected] <indo-oracle%40yahoogroups.com> [mailto:
> [email protected] <indo-oracle%40yahoogroups.com>] On
> Behalf Of Yoel Susanto
> Sent: Friday, February 15, 2008 11:04 AM
> To: [email protected] <indo-oracle%40yahoogroups.com>
> Subject: Re: [indo-oracle] cron Job scheduler
>
> Pak Edwin,
>
> Akan lebih cepat kalo bapak menyertakan Error message atau informasi lain
> yang membantu
> Daripada anda cuman dapat reply "apa error messagenya?" :)
>
> Coba check dahulu $ORACLE_HOME/rdbms/admin/externaljob.ora file
> apakah sudah di set seperti berikut.
>
> run_user = oracle
> run_group = dba
>
> Cheers,
>
> On 15/02/2008, Edwin Setiawan <[EMAIL PROTECTED] <edwin%40reindo.co.id>>
> wrote:
> >
> > Selamat siang,
> > Saya ingin membuat job pada oracle, yang fungsinya seperti cron.
> > Saya sudah buat file exekusinya, yang kalau kita jalankan lewat prompt,
> > gak masalah.
> > Tapi, begitu saya masukin lewat scheduler job kok gak bisa ya apa saya
> > salah menu?
> >
> > Terima kasih
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>  
>


[Non-text portions of this message have been removed]



--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indooracle.wordpress.com
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.blogspot.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indo-oracle/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Kirim email ke