Export using Parameter file and then ( Cron Job ) [message #194827] |
Mon, 25 September 2006 09:52 |
faiz_hyd
Messages: 294 Registered: February 2006
|
Senior Member |
|
|
hi all
I want to submit a cron job from my OS "Sun Microsystems Inc. SunOS 5.7 " and
DataBase version Oracle 9.2
I want to create a parameter for full schema export , and submit this as a cron job
my path where dump files are there on server is "/export/home/oracle/dmp> "
Every monday morning-10 a.m
In the parameter file it is like this
rm SCHEMA_LAST_3_weekOLD.dmp -- remove last 3 weeks old dmp file because we want to keep 3 dmp at a time then start export
exp user=scott/tiger file=SCHEMA_THIS_MONDAY_DATE.dmp(eg:- SCOTT_25SEP2006.dmp) log=SCHEMA_THIS MONDAY DATE.log
Please help in building the parameter file, passing dynamic monday date and as well as the removing the
last third monday for example
as on 9/25/2006 it will have these 2 files plus today's dmp
"Sep 11 09:13 DBC_09SEP06.dmp
Sep 18 08:43 DBC_18SEP06.dmp"
Thanks
|
|
|
Re: Export using Parameter file and then ( Cron Job ) [message #194890 is a reply to message #194827] |
Tue, 26 September 2006 00:25 |
oracledba_raja
Messages: 23 Registered: July 2006
|
Junior Member |
|
|
>I want to submit a cron job from my OS "Sun Microsystems Inc. SunOS 5.7 " and
>DataBase version Oracle 9.2
Hi,
if you want to do housekeeping by crontab, you can use
00 09 * * * find /oracle_home/SID/exportdumpfiles/* -mtime 3 -exec rm { } \
In the above example, it will find the 3 day old files in the directory /oracle_home/SID/exportdumpfiles and remove automatically on every morning around 9am.
You just try it in a test directory and make yourself familiar well then apply it in production.
Thanks.
Regards,
Raja
|
|
|
Re: Export using Parameter file and then ( Cron Job ) [message #195831 is a reply to message #194890] |
Mon, 02 October 2006 12:34 |
faiz_hyd
Messages: 294 Registered: February 2006
|
Senior Member |
|
|
Hi,
I have one more question on export/import,
While taking export/import we want to stop all the schedule jobs we submitted through DBMS_JOBS from running so as to maintain consistency, since we have jobs which collect stats / Purge Data (hourly ) (daily ) (date wise ) / Purge Partition table Data/
and once import is done how can we start those jobs again.
How can i do this, Oracle version 9i Rel 2.
Thanks
|
|
|