简体   繁体   中英

drop user ORA-00604 and ORA-00054

I execute a impdp, but it does not finish because there isnt space in tablespace.

I stop the impdb and now i Need drop the new schema and I use this command:

SQL> drop user TEST cascade;
drop user TGK_EXOR_IFIL_008_432 cascade
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

I dont find any lock on database for this schema:

SQL> select * from v$session where username = 'TEST';

no rows selected

I use oracle 11g

The impdp was either still running or it was rolling back the import itself.
You can try and wait for it to finish or kill it manually. Find it with this:

select o.object_name as "object_name",
       s.sid as "sid",
       s.serial# as "serial#",
       s.username as "username",
       sq.sql_fulltext as "sql_fulltext"
  from v$locked_object l, dba_objects o, v$session s,
       v$process p, v$sql sq
  where l.object_id = o.object_id
    and l.session_id = s.sid and s.paddr = p.addr
    and s.sql_address = sq.address;

credit
After finding the object that is locked you can kill the sid.
Or if a table is holding it up you can mark it read only:

alter table table_name read only;

I faced similar issue, in oracle 12c database, connect to database using command prompt as sql> sys as sydba enter password

Run sql>@catqueue.sql under C:\app\dbuser\product\12.1.0\dbhome_1\RDBMS\ADMIN

Then run drop user xxxx cascade; --- should be able to drop the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM