--查询锁表情况
select object_name,machine,s.sid,s.serial#
from gv$locked_object l,dba_objects o,gv$session s
where l.object_id=o.OBJECT_ID
and l.SESSION_ID=s.SID;
--解锁
alter system kill session '662,1131';
--查询当天有轨迹的车辆数量
select count(1) from pssc.t_vehicle_info_gis t where t.vhcl_sn like '赣C%';--141 11
select * from pssc.t_vehicle_info_gis t where t.vhcl_sn like '赣C%' and
t.vhcl_sn in(
select t.vhcl_sn from pssc_mid.t_gps_history_position t where instr(t.gps_time,'2017-09-25')>0
);
select * from v$db_object_cache where name='P_BIGDATA_SYNC_POWERCUT';
select /*+rule*/ sid from v$access where object='P_BIGDATA_SYNC_POWERCUT';
--查看用户所属表空间
select username,default_tablespace from dba_users;
--查看表空间使用情况2
SELECT SUM(bytes) / (1024 * 1024) AS free_space, tablespace_name
FROM dba_free_space
GROUP BY tablespace_name;
SELECT a.tablespace_name,
a.bytes total,
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载