Sie sind auf Seite 1von 1

When an import session hangs, it is important that the underlying problem is

identified to be able to solve the problem.


First identify the session in the database serving the import :
select sid, user, program
from v$session
where upper(program) like '%IMP%';
Then verify the wait events for that session :
select sid, event, state, wait_time, seconds_in_wait
from v$session_wait
where sid = &sid;
This query will list the event that is being waited on, hence it will reveal
the underlying problem. Then act accordingly to solve the problem. Typically
this will be events like :
- log file switch archiving needed
Cause: Oracle is waiting on a log switch because the required redolog has not
yet been archived.
Action: Check that the archiver process is started and that Oracle is able to
archive the redolog files.
- library cache lock
Cause: A user session is holding a lock on a table that is being requested by
the import session.
Action: Remove the lock by asking the user to commit/rollback or by killing the
locking user session.
============monitor how fast a table is imported==============
select substr(sql_text,instr(sql_text,'INTO "'),30) table_name,
rows_processed,
round((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60,
1) minutes,
trunc(rows_processed/((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24
:mi:ss'))*24*60)) rows_per_min
from sys.v_$sqlarea
where sql_text like 'INSERT %INTO "%'
and command_type = 2
and open_versions > 0;

Das könnte Ihnen auch gefallen