Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Location
    Haaksbergen, Netherlands
    Posts
    69

    Unanswered: How to backup an Oracle db without using a job

    Hi,

    Currently I backup my Oracle database using the script below (copied from the EM).
    I run this script from a scripting host computer. Problem is, that it invokes a job that does the job, but it only runs for a second or so. I can't see when the job has finished.
    Is there another way to do the exact thing but waits until the job is done?
    After this backup, I compress the file and move it to an archive.
    Now I start this compression job safely after the backup has finished. It should be nice to start compression immediate after the backup has finished.

    Thanks,

    Wim


    declare
    h1 NUMBER;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'FULL', job_name => 'EXPORT000021', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATADUMPS', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U.DMP', directory => 'DATADUMPS', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach(handle => h1);
    end;
    /

  2. #2
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    How about creating a batch file that calls the backup script then calls the compression script?
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  3. #3
    Join Date
    Jun 2004
    Location
    Haaksbergen, Netherlands
    Posts
    69
    Problem with a batch file is, that I can't see when the backup has finished.

  4. #4
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    The good thing about using a batch file is that you don't need to know when the backup has finished - the compression step won't start until the backup step has completed. (Or is there more to your problem that I'm missing?)
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •