--統計表select
*from
t_sg_sjdjtj;
--資料表
select
*from v_dataservice_ext t where t.data_type='0
';--從描述資訊核對(統計表有,業務表沒有)
select
*from t_sg_sjdjtj t where
t.msxx
notin
(select s.data_name from v_dataservice_ext s where s.data_type='0
');--從表名核對
select t.*,t.rowid from t_sg_sjdjtj t where
t.ywb
notin
(select s.table_name from v_dataservice_ext s where s.data_type='0
');--綜合核對
select m.table_name,n.ywb,m.unit_name,n.ywdw from
v_dataservice_ext m,
(select t.msxx,t.ywb,t.ywdw from t_sg_sjdjtj t where
t.ywb
notin
(select s.table_name from
v_dataservice_ext s, t_sg_sjdjtj t
where
s.data_type='
0'and s.data_name=
t.msxx
and s.unit_name=
t.ywdw
--and s.table_name<>t.ywb
))n where m.data_name=n.msxx and m.data_type='0
';
--本週更新資料
select
*from
t_sg_sjdjtj s
where
s.msxx
notin
(select t.data_name from
t_sjtj t
);
--月度統計
select t.unit_name,t.data_name,t.data_methods,t.data_total,s.sl,decode(t.sync_mothods,'
0','
增量','全量'
) methods
from
data_report_ext t,t_sg_sjdjtj s
where (t.table_name=s.ywb or t.table_name=s.ywb||
'_in')
and t.data_type='0
'and t.display='1
'order
by t.unit_name;
--最近對接資料
select
t.unit_name,
t.data_name,
t.table_name,
t.create_date,
t.sync_mothods
from
v_dataservice_ext t
where t.data_type ='0
'and to_date(t.create_date, '
yyyy-mm-dd hh24:mi:ss
') >
to_date(
'20160601
', '
yyyymmdd')
order
byt.unit_name;
select
t.ywdw,t.msxx,t.ywb,t.rhjksj
from
t_sg_sjdjtj t
where to_date(t.rhjksj, '
yyyymmddhh24miss
') >
to_date(
'20160601
', '
yyyymmdd
');
shell監控指令碼 監控CDN 首頁
注意 請先參考 shell監控指令碼 準備工作,監控指令碼在 rhel5 下測試正常,其它版本的linux 系統請自行測試 監控cdn 首頁 cat chk cdn.sh bin bash script name chk cdn.sh check cdn index.html domain name...
檢視統計資訊 指令碼
我們要去 check 為啥過期了 看一下 為啥 統計資訊過期了,簡化了,自己考慮複雜情況 select from all tab modifications where table owner in select object owner from plan table and table name...
用 bash 指令碼統計詞頻
上週有朋友問一問題,他有乙個包含若干行ip位址的文字檔案,每個ip佔一行,需要統計每個ip在檔案中出現的次數,並且按照出現次數逆序排列。開始的時候使用了乙個 awk 指令碼來解決這個問題 bin awk f filename count ip.awk begin end 再執行 cat ip fil...