Issue:
Grant Command hanging for longer time
SQL> grant SELECT on "SYS"."GV_$INSTANCE" to "EBS_SYSTEM" with grant option ;
ORA-04021: timeout occurred while waiting to lock object
Solution:
1. Find out what session / process is blocking the grant and kill it.
BLOCKING_SESSION, SID, SERIAL#
from gv$session
where username is not null;
2. Get the SID and session # of the account preventing the grant (in my case it was DBSNMP)
log into the correct database instance as SYS and kill it
alter system kill session ',<serial#>' immediate;
alter system kill session '12,53838';
3. Completed successfully
SQL> grant SELECT on "SYS"."GV_$INSTANCE" to "EBS_SYSTEM" with grant option;
Grant succeeded.
No comments:
Post a Comment