Monitor Data Backup recovery progress (EXPDP/IMPDP/RMAN)

Source: Internet
Author: User

Monitor the Data Backup recovery progress (EXPDP/IMPDP/RMAN) 1. view the EXPDP/IMPDP progress 1. When you export data, if the data volume is large, some people may be anxious in the middle, but they may want to see how the progress is. You can see it using two views:

Col owner_name for a10col job_name for a20col operation for a10col job_mode for a10col state for a20col degree for a10col ATTACHED_SESSIONS for a30col DATAPUMP_SESSIONS for a30set linesize 200

 

You can use the PL/SQL DEVELOPER graphical tool directly to format the image to make it look good or not. You can use the DBA_DATAPUBMP_JOBS and DBA_DATAPUMP_SESSIONS views to display information about the data pump fetch job.
select * from DBA_DATAPUBMP_JOBS;select * from DBA_DATAPUMP_SESSIONS;select sid,serial# from v$session s,dba_datapump_sessions d where s.saddr=d.saddr;

 

In addition, the preceding SQL command line formatting is a bit problematic. For number Fields, 9999xxx (multiple 9) instead of axx should be used. Otherwise, a string of # will appear #. 2 attach parameter 1) view task progress this parameter is useful when you use a crontab background task to run an import/export task and want to view the task progress, you can connect to a disconnected session again to take over the export or import tasks again. Of course, you must first check jobname in the previous two views. 2) If you want to stop the crontab background task in the middle, this parameter is very useful. If you do not do this, you have to kill the process, and so many processes usually encounter errors. The method of killing the process with such a huge profit is strongly recommended. For example, if the script of the background task contains a similar command:
expdp system/xxx   DIRECTORY=DATA_PUMP_DIR2  parallel=32  DUMPFILE=xxxx-%U.dmp  filesize=50G  LOGFILE=xxx.log SCHEMAS=xxx   job_name=lurou.exp

 

ATTACH parameter explanation: Add Your Data Pump client session to a running job and enable you to interact with each other. This parameter can only be used in combination with the user name and password. In this case, you can use the following command to reconnect to the task and terminate the task in advance: expdp system/xxx attach = lurou. after exp is connected, run the help command to check the command for stopping the task. 3 longops views are not listed here. You can also monitor long-term running sessions through the v $ session_longops view. 4. View impdp progress using statements
SELECT   a.tablespace_name,         ROUND (a.total_size) "total_size(MB)",         ROUND (a.total_size) - ROUND (b.free_size, 3) "used_size(MB)",         ROUND (b.free_size, 3) "free_size(MB)",         ROUND (b.free_size / total_size * 100, 2) || '%' free_rate  FROM   (  SELECT   tablespace_name, SUM (bytes) / 1024 / 1024 total_size              FROM   dba_data_files          GROUP BY   tablespace_name) a,         (  SELECT   tablespace_name, SUM (bytes) / 1024 / 1024 free_size              FROM   dba_free_space          GROUP BY   tablespace_name) b WHERE   a.tablespace_name = b.tablespace_name(+);

 

2. Check the RMAN backup progress. In addition, you can use the following statement to record the rman backup progress.
SELECT SID,OPNAME, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"FROM V$SESSION_LONGOPSWHERE OPNAME LIKE 'RMAN%'AND OPNAME NOT LIKE '%aggregate%'AND TOTALWORK != 0AND SOFAR <> TOTALWORKorder by "%_COMPLETE" desc

 


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.