http://blog.csdn.net/jojo52013145/article/details/7470812During the development of a database, it is common to encounter problems in which the packages, stored procedures, functions cannot be compiled or compiled, and PL/SQL cannot respond.
Common Oracle problems with removing users and tablespaces (for example, a ORA-01940 cannot delete a solution for a currently connected user) at this time enter the sqlplus command window as an administrator. when you delete a user, the following
(2) The unlock method is altersystemkillsession878, 1773; * 878 is SID, and 1773 is SERIAL # * select * rule * s. username, decode (l. type, tm, tablelock, tx, rowlock, null) lock_level, o. owner, o. object_name, o. object_type, s. sid, s. serial #,
Oracle lock table and unlockSELECT/* + rule */s. username,Decode (l. type, 'TT', 'table lock ','Tx ', 'row lock ',NULL) LOCK_LEVEL,O. owner, o. object_name, o. object_type,S. sid, s. serial #, s. terminal, s. machine, s. program, s. osuserFROM v $
As far as I know, oracle versions 10 Gb later than oracle will not cause deadlocks due to user operation. This problem occurs when you log on to the system using the user name and password on the home page of your web project. You cannot access the
InORACLEThe process in the "killed" status locks system resources for a long time and does not release the resources. There is a better way than restarting the database.Operating SystemForcibly kill those processes.
1. The following statement is
Query and delete sessions in Oracle 1. query the current sessionSQLgt; selectusername, sid, serial # fromv $ sessionwhereusernameisnot
Query and delete sessions in Oracle 1. query the current session SQLgt; select username, sid, serial # from v $
We know that in the Oracle database, a process can be terminated by killsession. Its basic syntax structure is as follows:
We know that in the Oracle database, a process can be terminated by kill session. The basic syntax structure is as follows:
Oracle lock table and unlock
Select/* + rule */S. username,Decode (L. type, 'TT', 'table lock ','Tx ', 'row lock ',Null) lock_level,O. Owner, O. object_name, O. object_type,S. Sid, S. Serial #, S. Terminal, S. Machine, S. Program, S. osuserFrom
Source: http://blog.csdn.net/shmiloy001/article/details/6284419
Abstract:
1. Select Sid, serial #, username from V $ session;
2. Alter system kill session '_ SID, _ serial #'; (based on the result of step 1)
You can use kill to delete a connected
1. display the lock information in the Linux Database
Select sid, addr kaddr, type, lmode, block from v $ lock;
SID KADDR TY LMODE BLOCK------------------------------------------------3 0000000077459298 XR 1 03 0000000077459368 RD 1 03 00000000774594
1. view the currently unlocked object
Example: Execute select * from aa for update to lock the table aa;
Method 1: query by SQL
Select 'alter system kill session ', ''' | trim (t2.sid) |', '| trim (t2.serial #) | ''';'
From v $ locked_object t1,
Kill Oracle Online users and use root to execute this script on Oracle's serverParameter description for this Oracle user
Copy Code code as follows:
#!/bin/sh
function _oracleplus () {
Su-oracle-c "$oraclehome/bin/sqlplus/nolog" Connect/
Problem Description:
The client front desk applies a certain operation hang live, no error or operation normal end prompt.
View the lock information as follows:
Sql> with LK as (select Blocking_instance| | '. ' | | blocking_session blocker,
Use to delete a user, but there is a user connection when deleting
Sql> Conn/as SYSDBA
Connected.
sql> drop user test cascade;
Drop USER Test Cascade
*
ERROR at line 1:
Ora-01940:cannot drop a user is currently connected
By viewing the user's
Source: http://blog.csdn.net/zhrzhl/article/details/24020319
1. ORACLE SID View Settings
View SID, User name
$ env|grep SID, select * from V$instance, select Instance_name,host_name from V$instance;
View all users and user status of the database:Sql>
Oracle part fourth, performance tuning
[Q] If automatic tracking is set
[A] Login with System
Execute $oracle_home/rdbms/admin/utlxplan.sql Create a schedule
Perform $oracle_home/sqlplus/admin/plustrce.sql create plustrace role
If you want to
Oracle's common performance monitoring SQL statementsFirst, query the history of sql:---The SQL statement being executed:Select A.username, A.sid,b.sql_text, B.sql_fulltextFrom V$session A, V$sqlarea b where a.sql_address = b.address;---Query the
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.