日常维护sql
修复mysqlcheck -u -p --repair pmdb
prefix="/export/data/mysql/bin/mysql -u -p -e"
domain=机房
ne_dn=`$prefix "select dn from iempeam.node where name='$domain'" | grep -v dn`
修改自定义设备的U位,当前限制12U
select static_verify_rule from tbl_cm_business_attr where sigunit_resid='CmSig.205450.Unit';
设置成^(([1-9]{1})|(1[0-9])|(2[0-9])|(3[0-5])){1}$
update tbl_cm_business_attr set static_verify_rule='^(([1-9]{1})|(1[0-9])|(2[0-9])|(3[0-5])){1}$' where sigunit_resid='CmSig.205450.Unit';
机房节点修改成ShapNode(C80)
itemPoints = 248;505$248;505$464;505$464;649$248;649
insert into omcdb.tbl_properties_10003 values('${ne_dn}','${ne_dn}','itemPoints','-1','248;505$248;505$464;505$464;649$248;649'');
配电 制冷 机位 U空间 UPS 空调
Power Cooling Space Space(U) UPS Air Conditioner$prefix "update businessdb.tbl_capbasicinfo set TotalNum=73720.000,remaindernum=44232.000,usenum=29488.000 where dn='$ne' and captype='配电';"
$prefix "update businessdb.tbl_capbasicinfo set TotalNum=2217.000,remaindernum=1330.000,usenum=887.000 where dn='$ne' and captype='制冷';"
$prefix "update businessdb.tbl_capbasicinfo set TotalNum=550.000,remaindernum=250.000,usenum=300.000 where dn='$ne' and captype='机位';"
insert into businessdb.tbl_energypue_h values('NE=33554434', 2016081618, 1.57, 5);
insert into businessdb.tbl_energypue_h values('NE=33554434', 2016081619, 1.58, 5);
insert into businessdb.tbl_energypue_h values('NE=33554434', 2016081620, 1.56, 5);触发器:
SELECT * FROM information_schema.`TRIGGERS`;use businessdb;
delimiter //
create trigger update_pue after insert on tbl_energypowerconsumption_h for each row
begin
update tbl_energypue_h set value=round((1.5+rand(1)/5),2);
update tbl_energypue_d set value=round((1.5+rand(1)/5),2);
end; //
地图
gisfile=/opt/neteco/server/app/com.huawei.neteco.dc.gis/repository/as/com.huawei.neteco.dc.gis.ui-2.0-SNAPSHOT/GisMap.html
sed -i '/mapType/s/mapType : 5/mapType : 1/' $gisfile
sed -i '/center:/s/center:\[113,23\],/center:\[113,7\]/' $gisfile
保存天数
cat /opt/neteco/server/config/neteco/SumTimerConf.xml | grep Keep
DataCenterKeepDays选项
C80导出设备DN,类型,性能指标ID
$prefix "select dn,name as '设备名称',ME_TYPE as '类型' from iempeam.node;" > device_list.txt
$prefix "select b.netypename as '类型', a.resid as '指标ID', a.netypeid as '设备类型ID', a.res_value as '指标名称' from omcdb.tbl_language_resource a, omcdb.tbl_cm_devtype b where a.netypeid=b.devtypeid and a.opertype=7 and a.res_type=1 and a.lan_type=1;" > counter_list.txt
中转英特殊处理
update alarm_static_info
set alarmname='Communication Between NMS And NE Is Abnormal',
objectinstance='Address=Address,Protocol=Protocol,Port=Port,MedNodeID=Mediation Node ID',
PROPOSEDREPAIRACTIONS='Check the network fault or Host running status '
where alarmid=999999999;update alarm_static_info
set alarmname='PUE Alarm ',
PROPOSEDREPAIRACTIONS='1.Make sure the ammeter is startup and in normal.
2.Make sure the ammeter and design of power distribution not be modified manually.
3.Make sure the design of power distribution is correct. '
where ALARMNAME='PUE告警';
#健康检查
cd /opt/neteco/server/app/com.huawei.neteco.healthmgr/repository/as/com.huawei.neteco.healthmgr.ui-2.0-SNAPSHOT/META-INF/oms
mv extension.xml extension.xml.bak
#报警
cd /opt/neteco/server/app/com.huawei.neteco.ias/repository/as/com.huawei.neteco.ias.ui-1.0-SNAPSHOT/META-INF/oms
mv extension.xml extension.xml.bak
#工单
cd /opt/neteco/server/app/com.huawei.ifos.workorder/repository/as/com.huawei.ifos.workorder.ui-1.0-SNAPSHOT/META-INF/oms
mv extension.xml extension.xml.bak
#容量
cd /opt/neteco/server/app/com.huawei.neteco.dc.inventory/repository/as/com.huawei.neteco.dc.inventory.ui-2.0-SNAPSHOT/META-INF/oms
mv extension.xml extension.xml.bak
#通道
cd /opt/neteco/server/app/com.huawei.neteco.dc.channel/repository/as/com.huawei.neteco.dc.channel.ui-2.0-SNAPSHOT/META-INF/oms
mv extension.xml extension.xml.bak#性能同步
cd /opt/neteco/server/app/com.huawei.neteco.pm/repository/as
unzip com.huawei.neteco.pm.ds-2.0-SNAPSHOT.jar -d ds
cd ds/META-INF/oms
sed -i '/submenu id\=\"com.huawei.neteco.report.ui.topmenu.synch/i\<!--' extension.xml
sed -i '/dataCheck.changeFtpPeriod/{n;n;s/$/-->/}' extension.xml
dos2unix extension.xml
cd ../../
zip -r com.huawei.neteco.pm.ds-2.0-SNAPSHOT.jar *
cp com.huawei.neteco.pm.ds-2.0-SNAPSHOT.jar ../
cd ../
rm -rf ds#楼宇自控
cd /opt/neteco/server/app/com.huawei.neteco.building/repository/as
unzip com.huawei.neteco.building.ds-2.0-SNAPSHOT.jar -d ds
cd ds/META-INF/oms
mv extension.xml extension.xml.bak
cd ../../
zip -r com.huawei.neteco.building.ds-2.0-SNAPSHOT.jar *
cp com.huawei.neteco.building.ds-2.0-SNAPSHOT.jar ../
cd ../
rm -rf ds#告警同步
cd /opt/neteco/server/app/com.huawei.neteco.fm/repository/as/com.huawei.neteco.fm.ui-2.0-SNAPSHOT/META-INF/oms
sed -i '/oms.fm.extension.alarmsync.submenu/i\<!--' extension.xml
sed -i '/oms.fm.extension.alarmsync.submenu/{n;n;s/$/-->/}' extension.xml
控件文字
$prefix "select * from netecocommon.tbl_extend where fieldName='nodeName' and fieldValue='name'"
ids=`$prefix "select elementId from netecocommon.tbl_basic where toclass='com.huawei.neteco.topo.api.model.LabelStyle'" | grep -v elementId`
for id in $ids;
do
echo $id;
$prefix "update netecocommon.tbl_extend set fieldValue='true' where elementId='$id and fieldName='fill';"
$prefix "update netecocommon.tbl_extend set fieldValue='16777215' where elementId='$id and fieldName='fillColor';"
$prefix "update netecocommon.tbl_extend set fieldValue='0' where elementId='$id and fieldName='fontColor';"
done
To be continue...
日常维护sql的更多相关文章
- Oracle 史上最全近百条Oracle DBA日常维护SQL脚本指令
史上最全近百条Oracle DBA日常维护SQL脚本指令 https://mp.weixin.qq.com/s?__biz=MjM5MDAxOTk2MQ==&mid=2650281305&am ...
- MS SQL 日常维护管理常用脚本(二)
监控数据库运行 下面是整理.收集监控数据库运行的一些常用脚本,也是MS SQL 日常维护管理常用脚本(一)的续集,欢迎大家补充.提意见. 查看数据库登录名信息 Code Snippet SELEC ...
- 第三篇——第二部分——第五文 配置SQL Server镜像——域环境SQL Server镜像日常维护
本文接上面两篇搭建镜像的文章: 第三篇--第二部分--第三文 配置SQL Server镜像--域环境:http://blog.csdn.net/dba_huangzj/article/details/ ...
- SQL Server 日常维护经典应用
SQL Server日常维护常用的一些脚本整理. 1.sql server开启clr权限: GO RECONFIGURE GO ALTER DATABASE HWMESTC SET TRUSTWORT ...
- 数据库日常维护-CheckList_01历史Agent Job执行情况检查
检查Agent Job中日常维护作业或业务作业是否成功,如每天的备份.碎片整理.索引维护.历史备份文件清除等,可利用SSMS工具,通过CDC下面设置好的DB Server List,运行下面脚本一次, ...
- db2日常维护
一. DB2日常维护操作 1.数据库的启动.停止.激活 db2 list active databases db2 active db 数据库名 db2start --启动 db2stop [forc ...
- 程序员必备:Oracle日常维护命令
上一篇讲了Linux的日常维护命令,这篇讲讲Oracle的日常维护命令.工作中需要使用Oracle数据库的童鞋们,相信或多或少都需要对Oracle做一些基本的维护操作,例如导入导出总该有吧?( ...
- DB2日常维护——REORG TABLE命令优化数据库性能
一个完整的日常维护规范可以帮助 DBA 理顺每天需要的操作,以便更好的监控和维护数据库,保证数据库的正常.安全.高效运行,防止一些错误重复发生. 由于DB2使用CBO作为数据库的优化器,数据库对象的状 ...
- mha日常维护命令
mha日常维护命令 http://m.blog.chinaunix.net/uid-28437434-id-3959021.html?/13033.shtml 1.查看ssh登陆是否成功masterh ...
随机推荐
- Laravel excel安装与使用
在 Laravel 5 中使用 Laravel Excel 实现 Excel/CSV 文件导入导出功能 时间 2015-11-17 18:40:56 Laravel学院 原文 http://lar ...
- 利用sp_addlinkedserver实现远程数据库链接
--查看当前链接情况: select * from sys.servers; --使用 sp_helpserver 来显示可用的服务器 Exec sp_helpserver --删除已经存在的某个链接 ...
- AFNnetworking详解
AFN 一.什么是AFN 全称是AFNetworking,是对NSURLConnection的一层封装 虽然运行效率没有ASI高,但是使用比ASI简单 在iOS开发中,使用比较广泛 AFN的githu ...
- [ 转载 ] kernel32.BaseThreadInitThunk
Edited by wap2k, 20 October 2014 - 07:52 PM. This function is called to start a Win32 thread. Its pu ...
- python IDLE编程时遇到Python Error: Inconsistent indentation detected! 解决方法
仔细检查了几遍代码,发现indent没有错误! 之后试将所有indent都用空格代替,程序就跑起来了. 具体原因可能是IDLE环境内的Tab键有小bug.
- bonext.js学习笔记
bonext.js是个什么鬼? 首先这是一个前端开发框架,建立在Backbone.js的基础上,使用Jquery操作Dom,Bootstrap负责布局,Art-Template渲染模板,再加上自定义一 ...
- sybase ODBC驱动
windows64位系统ODBC数据源管理器位置 64位 C:\Windows\System32\odbcad32.exe 32位 C:\Windows\SysWOW64\odbcad32.exe s ...
- 输入m乘法表
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- JUC.Condition学习笔记[附详细源码解析]
目录 Condition的概念 大体实现流程 I.初始化状态 II.await()操作 III.signal()操作 3个主要方法 Condition的数据结构 线程何时阻塞和释放 await()方法 ...
- <fmt:formatDate>标签的输出格式:
<fmt:formatDate>标签的输出格式: d 月中的某一天.一位数的日期没有前导零. dd 月中的某一天.一位数的日期有一个前导零. ddd 周中 ...