统计某个时间段的归档日志大小
通过v$archived_log视图V$ARCHIVED_LOG displays archived log information from the control file, includingarchive log names. An archive log record is inserted after the online redo log issuccessfully archived or cleared (name column is NULL if the log was cleared). If the logis archived twice, the...
linux系统查看wwn号
WWN是 /sys/class/fc_host/hostX/port_name状态是 /sys/class/fc_host/hostX/port_state当前接口速率是 /sys/class/fc_host/hostX/speed当前接口类型是 /sys/class/fc_host/hostX/port_type
Oracle使用over()partition by删除重复记录
--删除rn不等于1的rowid所在行的记录delete from fhx_db_time t2 where t2.rowid in(select t1.rid from (--使用row_number() over(partition by XX order by XX)函数对重复数据加标识select fdt.*,row_number()over (partition by dbuid ,end_interval_time order by dbuid) rn ,rowid rid from fhx...
lv扩展过程中遇到的错误
错误:[root@dbabc.net ~]# lvextend -L +100 /dev/vg01/stripe_lv Using stripesize of last segment 64.00 KB Rounding size (1558 extents) down to stripe boundary size for segment (1557 extents) Extending logical volume stripe_lv to 6.08 GB Insufficient suitable allocatable ...
修改Python默认的执行版本
1.备份旧版本python,链接新版本python在/usr/bin中有python、python2、python2.7三个文件依次指向后者1 sudo mv python python.bak,2 sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python2.修改yum配置文件sudo vi /usr/bin/yum 将第一行指定的python版本改为python2.7(#!/usr/bin/pytho...
mysqldump备份脚本
[root@sq1 /]# cat logic_backup.sh#!/bin/bashCUR_DATE=`date +%Y%m%d` #获取当前的系统日期#innobackupex --defaults-file=/home/...
分区表之间隔分区(interval)
When to Use Range or Interval PartitioningRange partitioning is a convenient method for partitioning historical data. Theboundaries of range partitions define the ordering of the partitions in the tables orindexes.Interval partitioning is an extension to range partitioning in which, beyond a ...
oracle几个不常用但是会对性能有提升的视图
一、DBA_TABLESPACE_USAGE_METRICSDBA_TABLESPACE_USAGE_METRICS describes tablespace usage metrics for all types oftablespaces, including permanent, temporary, and undo tablespaces.通过这个视图可以直接查出表空间的使用率。二、V$ASM_DISKGROUP_STATV$ASM_DISKGROUP_STAT displays performance stati...
python3.x的异常处理
以前的python2.x的时候:try: fp=urllib.request.urlopen(blogurl) except Exception, e: print (e) print('download exception %s' % blogurl) return 0 现在python3.x的时候:...
su - username -c执行多条命令
实例如下:su - oracle -c 'export ORACLE_SID=test;echo "show parameter local_l" | sqlplus -s / as sysdba'
ORA-00604、ORA-01438、ORA-06512
Tue Feb 28 15:30:06 2017Errors in file /u01/app/oracle/diag/rdbms/cwgkavpd/cwgkavpd1/trace/cwgkavpd1_ora_165303.trc:ORA-00604: error occurred at recursive SQL level 1ORA-01438: value larger than specified precision allowed for this columnORA-06512: at line 2参见MOS文档:1275094.1由于登...
awk命令如何对两列加分隔符
一、以空格为分隔符awk ‘{print $1" "$2}’二、以逗号为分隔符awk ‘{print $1","$2}’
mysql5.1升级5.6
卸载原有mysql版本rpm -qa | grep -i mysql | xargs rpm -ev --nodeps去官网下载最新的社区版mysql5.6版本官网地址:www.mysql.com这个tar包里含有许多与MYSQL相关的安装包,需要哪个安装哪个,解压之后的包安装mysql的服务器端和客户端rpm -ivh mysql-server-5.6.35-1.el6.x86-64.rpmrpm -ivh mysql-...
更改oracleasm_scanorder参数
vi /etc/sysconfig/oracleasmoracleasm_scanorder="emc"或oracleasm_scanorder="sdllm"ps -ef | grep LOCAL=NO|grep -v grep|awk '{print $2}'|xargs kill -9srvctl stop instance -d CWGKVPD -i CWGKVPD2srvctl stop instance -d SGHRDB -i SGHRDB2crsctl stop crs /etc/init.d/oracleasm startv...
获取在oracleasmlib上hds存储的多路径
#!/bin/bashoracleasm listdisks > /tmp/1.txtvar2=`oracleasm listdisks |wc -l`> /tmp/2.txt> /tmp/3.txtfor ((i=1;i<=var2;i++))do var1=`cat /tmp/1.txt|sed -n ${i}p` oracleasm querydisk -p $var1 |grep emc|cut -d ':' -f 1|cut -b 6-|sed 's/1//g' >>/tmp/3.txt oracleasm querydisk -p $...
获取在oracleasmlib上emc存储的多路径问题
获取asm_lib所用磁盘所属的emc聚合磁盘名和emc磁盘名,并获取二者的差异#!/bin/bashvar1="oracleasm querydisk -p "var2="| grep emc|cut -d ':' -f 1|cut -b 6- >>/tmp/2.txt"#oracleasm listdisks >/tmp/1.txtoracleasm listdisks |awk '{print "oracleasm querydisk -p "$0"| grep emc|cut -d '\'':'\'' -f 1|cut -...
网络常用命令
1、查看网卡是否处于运行状态mii-tool 网卡名称
HDS存储常用命令
1、查看存储#cd /opt/DynamicLinkManager/bin/#./dlnkmgr view -lu
EMC存储常用命令
1、emc常用查看磁盘命令powermt display dev=all
excel的常用统计功能
A、B列,A列值逐一比对B列的全部值,看是否A列值存在于B列值中,公式如下:=ISNUMBER(MATCH(A1,B:B,)),返回值为true为存在