Home » RDBMS Server » Server Administration » analyze table problem in oracle 9i
analyze table problem in oracle 9i [message #64142] Tue, 21 December 2004 20:53 Go to next message
Amit Shishodia
Messages: 3
Registered: June 2004
Junior Member
Hi,

I am facing a problem with this statement in oracle 9i

when issue this stmt on sql prompt
anlyze table dt_transaction compute statistics;

sql goes into hang condition and after 10 minute it showing message

ora-04021 time out occur waiting to lock object dt_transaction

please anybody suggest me the cause and solution of prob.

Thanx

Amit Shishodia
Re: analyze table problem in oracle 9i [message #64144 is a reply to message #64142] Tue, 21 December 2004 21:08 Go to previous messageGo to next message
sri
Messages: 154
Registered: February 2000
Senior Member
First find whether the object dt_transaction is locked .

SELECT a.object_name,
a.owner object_owner,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.session_id sid,
b.oracle_username,
b.os_user_name
FROM all_objects a,
v$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1;
Re: analyze table problem in oracle 9i [message #64147 is a reply to message #64144] Wed, 22 December 2004 02:43 Go to previous messageGo to next message
Amit Shishodia
Messages: 3
Registered: June 2004
Junior Member
Hi Sri

Thanks for reply,

after executing this query table is not loked but again showing same message;

I have seen that if shut down database and restart again
it is working.

what is the reason behind this . I think this is the problem of PMON but not clear .

Please help me how can i resolve this problem

Thanx

Amit
Re: analyze table problem in oracle 9i [message #64148 is a reply to message #64147] Wed, 22 December 2004 03:29 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Analyze table by itself will not lock the table ( except when you validate structure).
Seems there was some other lock on the table.
Once you bounce your database, the locks are cleared.
If you can reproduce the case please post again.
Previous Topic: index rebuild offline
Next Topic: Failover mechanism delay
Goto Forum:
  


Current Time: Thu Jan 09 22:22:07 CST 2025