Dear Readers, In this article, we will see the following Important Monitoring commands for EXPDP/IMPDP (SecureCRT). MenuBar : Datapump (Exports and Imports) Tab : DataPump_Sessions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
SET TERMOUT OFF; COLUMN current_instance NEW_VALUE current_instance NOPRINT; SELECT rpad(instance_name, 17) current_instance FROM v$instance; SET TERMOUT ON; PROMPT PROMPT +------------------------------------------------------------------------+ PROMPT | Report : Data Pump Sessions | PROMPT | Instance : ¤t_instance | PROMPT +------------------------------------------------------------------------+ SET ECHO OFF SET FEEDBACK 6 SET HEADING ON SET LINESIZE 180 SET PAGESIZE 50000 SET TERMOUT ON SET TIMING OFF SET TRIMOUT ON SET TRIMSPOOL ON SET VERIFY OFF CLEAR COLUMNS CLEAR BREAKS CLEAR COMPUTES COLUMN instance_name FORMAT a9 HEADING 'Instance' COLUMN owner_name FORMAT a15 HEADING 'Owner Name' COLUMN job_name FORMAT a20 HEADING 'Job Name' COLUMN session_type FORMAT a15 HEADING 'Session Type' COLUMN sid FORMAT 999999 HEADING 'SID' COLUMN serial_id FORMAT 99999999 HEADING 'Serial ID' COLUMN oracle_username FORMAT a18 HEADING 'Oracle User' COLUMN os_username FORMAT a18 HEADING 'O/S User' COLUMN os_pid FORMAT a8 HEADING 'O/S PID' BREAK ON report ON instance_name_print ON owner_name ON job_name |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
SELECT i.instance_name instance_name , dj.owner_name owner_name , dj.job_name job_name , ds.type session_type , s.sid sid , s.serial# serial_id , s.username oracle_username , s.osuser os_username , p.spid os_pid FROM gv$datapump_job dj , gv$datapump_session ds , gv$session s , gv$instance i , gv$process p WHERE s.inst_id = i.inst_id AND s.inst_id = p.inst_id AND ds.inst_id = i.inst_id AND dj.inst_id = i.inst_id AND s.saddr = ds.saddr AND s.paddr = p.addr (+) AND dj.job_id = ds.job_id ORDER BY i.instance_name , dj.owner_name , dj.job_name , ds.type; Instance Owner Name Job Name Session Type SID Serial ID Oracle User O/S User O/S PID --------- --------------- -------------------- --------------- ------- --------- ------------------ ------------------ -------- orcltest12 SYS SYS_EXPORT_FULL_01 DBMS_DATAPUMP 38 27306 SYS oracle 94647 orcltest12 MASTER 213 48974 SYS oracle 94669 orcltest12 WORKER 59 38644 SYS oracle 94689 |
Tab : Datapump_Progress
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
SET TERMOUT OFF; COLUMN current_instance NEW_VALUE current_instance NOPRINT; SELECT rpad(instance_name, 17) current_instance FROM v$instance; SET TERMOUT ON; PROMPT PROMPT +------------------------------------------------------------------------+ PROMPT | Report : Data Pump Job Progress | PROMPT | Instance : ¤t_instance | PROMPT +------------------------------------------------------------------------+ SET ECHO OFF SET FEEDBACK 6 SET HEADING ON SET LINESIZE 180 SET PAGESIZE 50000 SET TERMOUT ON SET TIMING OFF SET TRIMOUT ON SET TRIMSPOOL ON SET VERIFY OFF CLEAR COLUMNS CLEAR BREAKS CLEAR COMPUTES COLUMN instance_name FORMAT a9 HEADING 'Instance|Name' COLUMN owner_name FORMAT a15 HEADING 'Owner|Name' COLUMN job_name FORMAT a20 HEADING 'Job|Name' COLUMN session_type FORMAT a8 HEADING 'Session|Type' COLUMN start_time FORMAT a19 HEADING 'Start|Time' COLUMN time_remaining FORMAT 9,999,999,999 HEADING 'Time|Remaining (min.)' COLUMN sofar FORMAT 9,999,999,999,999 HEADING 'Bytes Completed|So Far' COLUMN totalwork FORMAT 9,999,999,999,999 HEADING 'Total Bytes|for Job' COLUMN pct_completed FORMAT a10 HEADING 'Percent|Completed' BREAK ON report ON instance_name_print ON owner_name ON job_name |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
SELECT i.instance_name instance_name , dj.owner_name owner_name , dj.job_name job_name , ds.type session_type , TO_CHAR(sl.start_time,'mm/dd/yyyy HH24:MI:SS') start_time , ROUND(sl.time_remaining/60,0) time_remaining , sl.sofar sofar , sl.totalwork totalwork , TRUNC(ROUND((sl.sofar/sl.totalwork) * 100, 1)) || '%' pct_completed FROM gv$datapump_job dj , gv$datapump_session ds , gv$session s , gv$instance i , gv$session_longops sl WHERE s.inst_id = i.inst_id AND ds.inst_id = i.inst_id AND dj.inst_id = i.inst_id AND sl.inst_id = i.inst_id AND s.saddr = ds.saddr AND dj.job_id = ds.job_id AND sl.sid = s.sid AND sl.serial# = s.serial# AND ds.type = 'MASTER' ORDER BY i.instance_name , dj.owner_name , dj.job_name , ds.type; Instance Owner Job Session Start Time Percent Name Name Name Type Time Remaining (min.) SOFAR TOTALWORK Completed --------- --------------- -------------------- -------- ------------------- ---------------- ---------- ---------- ---------- orcltest11 SYS SYS_EXPORT_FULL_01 MASTER 02/17/2021 14:18:50 6 13009 26840 48% |
Tab : Datapump_jobs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
set linesize 300 col state for a15 SET TERMOUT OFF; COLUMN current_instance NEW_VALUE current_instance NOPRINT; SELECT rpad(instance_name, 17) current_instance FROM v$instance; SET TERMOUT ON; PROMPT PROMPT +------------------------------------------------------------------------+ PROMPT | Report : Data Pump Jobs | PROMPT | Instance : ¤t_instance | PROMPT +------------------------------------------------------------------------+ SET ECHO OFF SET FEEDBACK 6 SET HEADING ON SET LINESIZE 180 SET PAGESIZE 50000 SET TERMOUT ON SET TIMING OFF SET TRIMOUT ON SET TRIMSPOOL ON SET VERIFY OFF CLEAR COLUMNS CLEAR BREAKS CLEAR COMPUTES COLUMN owner_name FORMAT a25 HEADING 'Owner Name' COLUMN job_name FORMAT a20 HEADING 'Job Name' COLUMN operation FORMAT a10 HEADING 'Operation' COLUMN job_mode FORMAT a10 HEADING 'Job Mode' COLUMN state FORMAT a15 HEADING 'State' COLUMN degree FORMAT 999999 HEADING 'Degree' COLUMN attached_sessions FORMAT 999,999 HEADING 'Attached Sessions' |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
SELECT dpj.owner_name owner_name , dpj.job_name job_name , dpj.operation operation , dpj.job_mode job_mode , dpj.state state , dpj.degree degree , dpj.attached_sessions attached_sessions FROM dba_datapump_jobs dpj ORDER BY dpj.owner_name , dpj.job_name; Owner Name Job Name Operation Job Mode State Degree Attached Sessions ------------------------- -------------------- ---------- ---------- --------------- ------- ----------------- SYS SYS_EXPORT_FULL_01 EXPORT FULL EXECUTING 1 1 |
Tab : DBA Directories
|
set linesize 300 col owner format a10 col directory_name for a60 col directory_path format a100 |
|
SELECT * FROM dba_directories; SQL> OWNER DIRECTORY_NAME DIRECTORY_PATH ORIGIN_CON_ID ---------- --------------------- ------------------------------------------------------ ------------- SYS DATA_PUMP_DIR /u01/app/oracle/product/12.1.0.2/dbhome_1/rdbms/log/ 0 SYS DBA_EXPORT /dbbackup/datapump/orcltest 0 |
Tab :… Read More