Home » RDBMS Server » Backup & Recovery » Job_Action details (Oracle 10g, Windows 7)
Job_Action details [message #482520] Fri, 12 November 2010 04:06 Go to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 messageGo to next message
John Watson
Messages: 8499
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 messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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
John Watson
Messages: 8499
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.
Previous Topic: RMAN-06023: no backup or copy of datafile 4 found to restore
Next Topic: How restore and recovery works
Goto Forum:
  


Current Time: Sat Feb 27 00:54:14 CST 2021