Job_Action details [message #482520] |
Fri, 12 November 2010 04:06 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
Dear All,
I am new to DBA's world. I have got a script to create a job for back up scheduling and then execute the job. But i could find out the location of the file saved. Please suggest me or give me a hints to work with.
BEGIN
DBMS_SCHEDULER.create_job (
JOB_NAME => 'XYZ.ONLINE_BACKUP1',
JOB_TYPE => 'EXECUTABLE',
JOB_ACTION => '/home/online_backup.sh',
start_date => SYSTIMESTAMP,
end_date => SYSTIMESTAMP + INTERVAL '30' day,
repeat_interval => 'FREQ=MINUTELY; INTERVAL=30', comments => 'Every 30 MIN Backup');
END;
and for executing the job
EXEC DBMS_SCHEDULER.enable('XYZ.ONLINE_BACKUP1');
[Updated on: Fri, 12 November 2010 04:14] Report message to a moderator
|
|
|
Re: Job_Action details [message #482529 is a reply to message #482520] |
Fri, 12 November 2010 04:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
John Watson
Messages: 8965 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Is it possible that you are mis-understanding what the Scheduler does?
The procedures in DBMS_SCHEDULER will not create and save any files: they create and modify the job definition, which is stored within the database. It is not like cron, with an external crontab file that defines the jobs.
Is that your problem?
|
|
|
Re: Job_Action details [message #482530 is a reply to message #482529] |
Fri, 12 November 2010 04:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
Dear John,
Thanks for the reply. So if my databse crashed how can i recover? Because my backup file is also stored in the DB so if DB crash thus my backup file as well. So John hope my those questions are not irretating you that much. So suggest me how to keep backup files in drive instate of storing it the DB it self? It has to be a automated timer based such that every 1 hour it will take the backup and stored in the Drive (C:/ or D:/).
Thanks in Advance
Mahatab
|
|
|
Re: Job_Action details [message #482563 is a reply to message #482530] |
Fri, 12 November 2010 10:37 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
John Watson
Messages: 8965 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I hope this doesn't sound impolite, but I think you are lacking some basic knowledge about database admin and operating systems. You need to understand how backups work before you try to use the Scheduler to carry them out.
For example, you refer to a script "/home/online_backup.sh" in your first post, and to "Drive (C:/ or D:/)" in your second post. That combination doesn't make any sense.
This sort of thing covered in the Oracle University "Workshop 1" course for DBAs.
|
|
|