1748120 Members
3236 Online
108758 Solutions
New Discussion юеВ

Re: oracle dbms

 
?? ┬┐? ??
New Member

oracle dbms

How can I export oracle file in cronfile?
5 REPLIES 5
Alexander M. Ermes
Honored Contributor

Re: oracle dbms

Hi there.
add line to cron :

# 42 21 * * 5 su - oracle $ORACLE_HOME/bin/exp user/password parfile=xyz.parfile

parfile sample attached.
Rgds
Alexander M. Ermes


.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Alexander M. Ermes
Honored Contributor

Re: oracle dbms

Hi there.
Forgot one parameter in parfile:
file=/.../.../xy.dmp
log=/.../.../xy.log
you can add more parametersfrom the command exp help=yes.

Rgds
Alexander M. Ermes

.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Richard Mertz
Regular Advisor

Re: oracle dbms

The only problem with Alexander's solution is that when the export runs, anyone able to do a ps -ef will be able to see the username/password for the oracle account being exported (this may or may not be a problem for you). I believe you can redirect the input and put the username/password in the par file. I'll check when I get in this morning.

Richard Mertz
What anybody thinks of me is none of my business.
Alexander M. Ermes
Honored Contributor

Re: oracle dbms

Hi there. Yes, sorry. Put the username and password as parameter USERID in the parfile.
Rgds
Alexander M. Ermes.
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Joseph C. Denman
Honored Contributor

Re: oracle dbms

I would create script to do the export, and then call the script from the cron. This way you can add additional items such as emailing the log to yourself.
If I had only read the instructions first??