DB locked?

Source: Internet
Author: User
When a problem occurs, the devicestate of the gqkk database cannot be inserted and the database is locked. Solution: -- Step1: check who is accessing this object select B. sid, B. username, B. machine from V $ access a, V $ session B where. SID = B. sid and. object = 'device _ table_map2_tg '-- Obtain the process ID of the Operating System Based on the SID. Select spid OS _sid from V $ process where ADDR = (select paddr from V $ session where Sid = & oracle_sid) -- Use SSH secuture to log on, And Then PS-Ef | grep 14153 kill-9 14153

 

References:

You need to deleteDatabaseDuring the deletion process, the following error is reported:

Drop user greenpass
*
Error at line 1:
ORA-04021: timeout occurred while waiting to Lock Object newdr. hndr_sms_log

Handling process

1. First query newdr. hndr_sms_log, which is a 'Procedure ';

2. An error is reported. The object cannot be locked.

3. Check what sessions are accessing this object:

Select B. Sid, B. username, B. Machine
From v $ access a, V $ session B
Where a. Sid = B. Sid
And a. Object = 'hndr _ sms_log'
And a. type = 'processed ';

Sid username Machine
-----------------------------------------
520 newdr workgroup \ bonc02

4. Obtain the process Number of the Operating System Based on the SID.

Select spid OS _sid
From v $ Process
Where ADDR = (select paddr from V $ session where Sid = & oracle_sid );

Old 3: Where ADDR = (select paddr from V $ session where Sid = & oracle_sid)
New 3: Where ADDR = (select paddr from V $ session where Sid = 520)

OS _sid
------------
29360

5. Ask the business personnel to directly kill the process.

PS-Ef | grep 29360
Kill-9 29360

6. Try again
SQL> drop user greenpass;

User discarded

----------------- Http://hi.baidu.com/51885729/blog/item/d1ea1a9717be0e6454fb9655.html

 

 

Why .... It is estimated that I have used a network management software...

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.