Oracle backup policy (create_schedule +)

Source: Internet
Author: User
ReferenceArticleHTTP://Blog.itpub.net/Post/33454/395121HTTP://Www. ADP-GmbH. ch/Blog/2005/May/27. Html

 

Define a plan (executed every day)

Call dbms_scheduler.create_schedule ('Back_up_indonesiaprod2', Sysdate,'Freq = daily', To_date ('2013-03-25 10:00:00','Yyyy-mm-dd hh24: MI: SS'); -- Delete the Stored Procedure Call dbms_scheduler.drop_schedule ('test ');
-- Modify call dbms_scheduler.set_attribute ('back _ up_indonesiaprod2 ', 'Repeat _ interval', 'freq = minutely ');

Define a task (execute the backup library of the. BAT file)

 --  Create Begin  Dbms_scheduler.create_job (job_name  =>   '  Backup_03_15  '  , Schedule_name  =>   '  Back_up_indonesiaprod2  '  , Job_type  =>   '  Executable  ' , Job_action  =>   '  C: \ backup_indonesiaprod2.bat  '  , Enabled  =>  True, comments  =>   '  Back_up_indonesiaprod2  '  );  End  ;  /  -- Delete  Begin  Dbms_scheduler.drop_job (  '  Backup_03_15  '  );  End  ;  / 

 

 

Task script

Exp indonesiaprod2/indonesiaprod2 @ localhost:1521/Xe full = NFile='Indonesiaprod2 _ % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2%. dmp'Log = indonesiaprod2 _ %Date:~0,4%Date:~5,2%Date:~8,2Cmd.txt

View the current user's plans and tasks

 
SelectJob_name, program_name, schedule_nameFromUser_scheduler_jobs;

View the current user plan and task running status

Select * FromUser_scheduler_job_run_detailsOrder ByLog_idDesc;

Open the following services:

 

Modify and query the following parameters:

Alter system set job_queue_processes = 10;

Show parameter job_queue_process;

Task execution result: generate the following file

-----

Data Import

# Set Nls_lang =  American_america.utf8
# > IMP System / Cici123love @ XE

Import: Release11.2.0.2.0 -ProductionOnFri MAR15 23:47:24 2013

Copyright (c)1982,2009, OracleAnd/orIts affiliates.AllRights Reserved.

ConnectedTo: OracleDatabase11g express Edition Release11.2.0.2.0 -Productio
N

Import DataOnly(Yes/No): No>C: \ Users \ administrator. Cici-Think \ indonesiaprod2
. Dmp

IMP-00001: RespondWithEither yes, no,Return Or '.' ToQuit
Import DataOnly(Yes/No): No>

ImportFile: Expdat. dmp>C: \ Users \ administrator. Cici-Think \ indonesiaprod2.dmp

EnterInsertBuffer size (minimumIs 8192)30720>
ExportFileCreatedByExport: v11.02.00Via conventional path

Warning: the objects were exportedByIndonesiaprod2,Not ByYou

Import done In Utf8 Character Set And Al16utf16 Nchar Character Set
Import server uses al32utf8 Character Set (Possible charset conversion)
Export client uses al32utf8 Character Set (Possible charset conversion) ^ C
C: \ Users \ administrator. Cici - Think > IMP System / Cici123love @ XE

Import: Release11.2.0.2.0 -ProductionOnFri MAR15 23:48:15 2013

Copyright (c)1982,2009, OracleAnd/orIts affiliates.AllRights Reserved.

ConnectedTo: OracleDatabase11g express Edition Release11.2.0.2.0 -Productio
N

Import DataOnly(Yes/No): No>

ImportFile: Expdat. dmp>C: \ Users \ administrator. Cici-Think \ indonesiaprod2.dmp

EnterInsertBuffer size (minimumIs 8192)30720>

ExportFileCreatedByExport: v11.02.00Via conventional path

Warning: the objects were exportedByIndonesiaprod2,Not ByYou

Import done in utf8 character set and al16utf16 nchar character S

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.