oracle删除死锁的session
查看锁表进程SQL语句1:
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
杀掉锁表进程:
alter system kill session 'sid,serial#';
如有记录则表示有lock,记录下SID和serial# ,将二者连接起来,就可以kill。如下:
alter system kill session '1458,15829';
相关文档:
首先你要有tomcat,还要有oracle jdbc的jar档等环境.
第一步: 写JSP
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@(des ......
最近忙于公司的项目开发,很久没有来csdn了。今天无事,上来写点东西。供大家参考,不对的地方还希望大家批评指正。
一下是对oracle数据库表的一些操作语句:
已经建好的表添加字段
alter table Tablename add(column1&nb ......
在Oracle关于时间属性的建表
Example:
create table courses(
cid varchar(20) not null primary key,
cname varchar(20) not null,
ctype integer,
ctime date DEFAULT SYSDATE,
cscore float not null
)
insert into courses values('ss01','.NET',0,TO_DATE('2009-8-28','yyyy-mm-dd'),94)
insert into course ......
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='admin'
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='liuzhaoqing'
select t.OSUSER,t.STATUS,t.LOGON_TIME from v$session t where t.OSUSER='ymx'
sel ......
数学函数:
1.绝对值
S:SELECT abs(-1) value
O:SELECT abs(-1) value from dual
2.取整(大)
S:SELECT ceiling(-1.001) value
O:SELECT ceil(-1.001) value from dual
3.取整(小)
S:SELECT floor(-1.001) value
O:SELECT floor(-1.001) value from dual
4.取整(截取)
S:SELECT cast(-1.002 as int) value
O ......