查詢鎖表:
select sess.sid,
sess.serial#,
sess.username,
decode(l.lmode,
0,'none',
1,'null',
2,'ss',
3,'sx',
4,'share',
5,'srx',
6,'x',
l.lmode) lockmode
from v$lock l, v$session sess, dba_objects do
where l.sid = sess.sid
and l.id1 = do.object_id;
查詢某錶的空間占用:
select segment_name,
alt.owner
tablespace_name,
segment_type,
round((bytes /1024/1024/1024), 2) as "大小(gb)"
from user_segments, all_tables alt
where segment_type = 'table'
and segment_name like '%history%'
and alt.table_name = segment_name
order by tablespace_name, bytes desc;
建立database link的語句:
create database link dblink_test
connect to wings identified by wings
using '(description =
(address_list =
(address = (protocol = tcp)(host = 192.168.1.100)(port = 1521))
)(connect_data =
(service_name = testdb)
))';
Git常用操作(未完,待續 )
git config global user.name zhouxiaowan git config global user.email 1012596161 qq.com mkdir learngit 新建乙個空目錄 cd learngit 開啟learngit目錄 pwd pwd git ini...
nginx 未完待續
yum install y pcre yum install y pcre devel yum install y openssl yum install y openssl devel yum install y zlib yum install y gccyum安裝 yum install y ...
sqlparse(未完待續)
sqlparse.split sql,encoding none sql 包含乙個或多個sql語句的字串 encoding 語句的編碼 可選 sql select from foo select from bar sql list sqlparse.split sql print sql list ...