Link to home
Create AccountLog in
Avatar of msimons4
msimons4

asked on

schedule expdp


Will this work?

BEGIN
  SYS.DBMS_SCHEDULER.DROP_JOB
    (job_name  => 'export_backup');
END;
/

BEGIN
  SYS.DBMS_SCHEDULER.CREATE_JOB
    (
       job_name        => 'export_backup'
      ,start_date      => TO_TIMESTAMP_TZ('2011/11/02 02:00:00.000000 US/Eastern', 'yyyy/mm/dd hh24:mi:ss.ff tzr')
      ,repeat_interval => 'FREQ=DAILY;'
      ,end_date        => NULL
      ,job_class       => 'DEFAULT_JOB_CLASS'
      ,job_type        => 'PLSQL_BLOCK'
      ,job_action      => 'begin expdp system/password@database full=y directory=directory_name schemas=amcs_owner dumpfile=dumpfile_name.dmp logfile=logfile_name.log end;'
      ,enabled         => TRUE
      ,comments        => 'datapump export'
    );
End;

/
Avatar of msimons4
msimons4

ASKER

Don't want to include schema in a full

BEGIN
  SYS.DBMS_SCHEDULER.DROP_JOB
    (job_name  => 'export_backup');
END;
/

BEGIN
  SYS.DBMS_SCHEDULER.CREATE_JOB
    (
       job_name        => 'export_backup'
      ,start_date      => TO_TIMESTAMP_TZ('2011/11/02 02:00:00.000000 US/Eastern', 'yyyy/mm/dd hh24:mi:ss.ff tzr')
      ,repeat_interval => 'FREQ=DAILY;'
      ,end_date        => NULL
      ,job_class       => 'DEFAULT_JOB_CLASS'
      ,job_type        => 'PLSQL_BLOCK'
      ,job_action      => 'begin expdp system/password@database full=y directory=directory_name dumpfile=dumpfile_name.dmp logfile=logfile_name.log end;'
      ,enabled         => TRUE
      ,comments        => 'datapump export'
    );
End;

/
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer