티스토리 뷰
PL/SQL문
declare
h1 NUMBER;
begin
begin
h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'FULL', job_name => 'MY_EXPORT', version => 'COMPATIBLE');
end;
begin
dbms_datapump.set_parallel(handle => h1, degree => 1);
end;
begin
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'exp', filetype => 3);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
end;
begin
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT3%U.DMP', directory => 'exp', filetype => 1);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
end;
begin
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
end;
begin
dbms_datapump.detach(handle => h1);
end;
end;
/
이전에 저장될 경로를 만들어야 함
경로 exp == /home/oracle/exp/
Job 스케줄러
BEGIN
sys.dbms_scheduler.create_job(
job_name => '"SYSTEM"."MY_JOB"',
job_type => 'PLSQL_BLOCK',
job_action => 'declare
h1 NUMBER;
begin
begin
h1 := dbms_datapump.open (operation => ''EXPORT'', job_mode => ''FULL'', job_name => ''MY_EXPORT'', version => ''COMPATIBLE'');
end;
begin
dbms_datapump.set_parallel(handle => h1, degree => 1);
end;
begin
dbms_datapump.add_file(handle => h1, filename => ''EXPDAT.LOG'', directory => ''exp'', filetype => 3);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => ''KEEP_MASTER'', value => 0);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => ''ESTIMATE'', value => ''BLOCKS'');
end;
begin
dbms_datapump.add_file(handle => h1, filename => ''EXPDAT3%U.DMP'', directory => ''exp'', filetype => 1);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => ''INCLUDE_METADATA'', value => 1);
end;
begin
dbms_datapump.set_parameter(handle => h1, name => ''DATA_ACCESS_METHOD'', value => ''AUTOMATIC'');
end;
begin
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
end;
begin
dbms_datapump.detach(handle => h1);
end;
end;
/
',
start_date => to_timestamp_tz('2009-07-19 23:50:00 +9:00', 'YYYY-MM-DD HH24:MI:SS TZH:TZM'),
job_class => 'DEFAULT_JOB_CLASS',
auto_drop => FALSE,
enabled => TRUE);
END;
'DataBase > Oracle' 카테고리의 다른 글
Checkpoint and Redo Tuning (0) | 2010.06.07 |
---|---|
Autotrace (0) | 2010.06.07 |
PL/SQL 기초 사용 예 (0) | 2010.05.28 |
싱글 인덱스와 결합 인덱스 쿼리 속도차이 (0) | 2010.05.27 |
Temp tablespace 사용법 (0) | 2010.05.18 |
- Total
- Today
- Yesterday
- 투싼
- iOS5
- 한글
- SQLPlus
- PostgreSQL
- 출시일
- Flashback
- MS-SQL
- Backup
- tablespace
- linux
- parameter
- query 잘림
- postgresql pg_stat_activity
- iPhone
- postgresql jsonb index
- 윈도우
- 아이폰
- 리눅스
- 갤럭시S
- PL/SQL
- 아이폰4
- postgresql jsonb
- 오라클
- index
- recovery
- Managing Schema Objects
- 인덱스
- 독도
- oracle