[Mysql] 4.Mysql 创建数据库
4.1 create and drop databaseC:\Users\admin>mysql -h localhost -u root -pmysqlmysql: [Warning] Using a password on thecommand line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.7.14 My...
[Shell] AWK实现SQL的功能(1)
原始数据:[/tmp/test]# cat emp7369 SMITH CLERK 7902 1980-12-17 800 0 207499 ALLEN&...
[HP-UX] vgchange -a e -q n vgxxx --执行此命令后,激活巻组
遇到的问题,记录下来.[root@xxxxx016:/]# vgchange -a y vgxxxMay 21 22:57:26 - "xxxxx016": Activating volume group vgxxx with exclusive option.vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c5t5d7":I/O errorvgchange: I/O errorvgchange: I/O errorvgchange: I/O e...
[RAC] Oracle11.2.0.4搭建RAC(Udev)
Oracle 11.2.0.4 RAC 安装Linux系统安装之类,就不截图了. 1.在两个节点建立相同的group&user[root@racdb1 ~]# groupadd -g 1000 oinstall[root@racdb1 ~]# groupadd -g 1200 asmadmin[root@racdb1 ~]# groupadd -g 1201 asmdba[root@racdb1 ~]# groupadd -g 1202 asmoper[root@rac...
[Mysql] 3.Mysql 数据类型
3.1 整数类型整数类型字节数无符合数的取值范围有符合数的取值范围TINYINT10~255-128~127...
[Mysql] 2.Mysql 5.7 Install (Windows)
http://dev.mysql.com/downloads/mysql/ 下载地址,在下拉框中选择相应的版本windows下直接双击下载文件安装吧直接上图吧 本地连接测试一下.E:\mysql\bin>mysql -h 172.16.20.31 -uroot -pEnter password: *****ERROR 1130 ...
[Mysql] 1.Mysql 5.7 绿色安装(windows)
1.1 下载http://dev.mysql.com/downloads/mysql/ 下载地址,在下拉框中选择相应的版本 1.2 安装下载下来的绿色安装包,直接解压为E:\mysql 1.3 编辑my.ini文件,将mydefault.ini copy一份出来,就该其中的参数....
[Shell] 脚本案例(1)--while,for,RANDOM,case
[/tmp/test]# more ss1#!/bin/sh#i=0i=`tail -1 ss1.log | awk '{print $NF}'`while(true)doyear=`date +%Y`month=`date +%m`day=`date +%d`hour=`date +%H`minute=`date +%M` second=`date +%S` let i=$i+1week=`date +%a`weekno=`date +%w`echo $$" "$year" "$month" "$day"&nbs...
[RAC] 11.2.0.4 RAC Grid 提示INS-30510
ORACLE 11.2.0.4 RAC Grid 安装提示 INS-30510: Insufficient number of ASM disks selected.错误的原因是由于磁盘数和冗余层级不匹配:如果创建用来存放OCR和VOTEDISK的ASM磁盘组,那么External、Normal、High三种冗余级别对应的Failgroup个数是1、3、5。也就是说,创建这三种冗余级别的磁盘组至少分别需要1、3、5个...
[RAC] Vcenter中共享磁盘的建立
Vcenter中共享磁盘的建立有几个要注意的地方:1.SCSI 控制器1 是添加磁盘后显示出来的.2.SCSI 控制器类型选择 “LSI Logic并行”,SCSI总线共享 选择“物理”3.硬盘n(2~7)的类型选择“厚置备置零”,虚拟设备节点选择“SCSI(1:n)” 其中n是0,1,2,3,4,5,6.....具体显示可以参照下图....
[Oracle] 查看tablespace的使用率(Including temp tablespace)
以前也写过查看tablespace的sql,下面写的sql包含temp tablespace的使用率的将permanent和temporary的使用率包含在一起的.select * from(select x.tablespace_name,x.contents,x.status,x.extent_management,x.all_bytes/1024/1024 "ALL_SIZE(MB)",y.free_bytes/1024/1024 "FREE_SIZE(MB)",(x.all_bytes-y.free_bytes)...
11.查看tablespace的使用率(Including temp tablespace)
以前也写过查看tablespace的sql,下面写的sql包含temp tablespace的使用率的将permanent和temporary的使用率包含在一起的.select * from (select x.tablespace_name,x.contents,x.status,x.extent_management,x.all_bytes/1024/1024 "ALL_SIZE(MB)",y.free_bytes/1024/1024 "FREE_SIZE(MB)",(x.all_bytes-y.free_bytes...
[Linux] device eth0 does not seem to present
虚拟机service network restart提示device eth0 does not seem to present需要如下动作:[root@iphone ~]# more /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules# program, run by the persistent-net-generator.rules rules file.## You can...
[AWK] 数字太大显示为科学计数法,需要显示全部数字
awk 数字太大显示为科学计数法了,需要显示全部数字[root->/tmp/test]# cat ff21234 1320987 43244567 432432345 24217654 53225678 54339876 323456 577456...
[Linux] mutt /xxxx/xxxx/sent is not a mailbox.
[mon@oracle6 source]$ echo "xxxxxxxxxsfds" | mutt -s "dssssssssssssssssssss" xxxxxxxx@163.com/home/mon/sent is not a mailbox.Could not send the message.想起之前做过了 echo > /home/mon/sent ,可能和这个有关系。只能baidu了,发现了如下方法:[mon@oracle6 ~]$ cp /var/mail/mon sent &...
10.monitor web data script
定时监控网页数据的简单脚本[mon@oracle6 ~]$ more /home/mon/source/mon_data#!/bin/bash export ORACLE_BASE=/u01/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=xxxxxdbres=`curl xxxx.xxxxx.xxx/xxxxxxxx | grep "xxxxxxxxxx" | grep "xx" | awk '{print $2}'`datetime=`d...
[Oracle] oracle 11g dataguard (one instance)
oracle 11g standby (one instance)primary xx.xx.xx.100 (node2)standby xx.xx.xx.35 (oracle)1.standby server add listener and tnsnames[oracle@oracle6 admin]$ more listener.ora SID_LIST_LISTENER2 = (SID_LIST = (SID_DESC = &...
[Oracle] oracle 11g database install(linux)
1.create user oracle[root@node2 ~]# groupadd oinstall[root@node2 ~]# groupadd dba[root@node2 ~]# useradd -g oinstall -G dba oracle[root@node2 ~]# passwd oracleChanging password for user oracle.New password: BAD PASSWORD: it is based on a dictionary wordRetype new password: passwd: all authe...
[SQLSERVER] sqlserver T-SQL 执行detach/attach,copy 命令
declare @backupdb nvarchar(200)declare @dfstr nvarchar(200)declare @dfdesstr nvarchar(200)declare @lgstr nvarchar(200)declare @cmdstr nvarchar(200)set @backupdb='xxxx_LOG_' + convert(varchar(30),getdate()-2,112) + '_000000'set @dfstr ...
[Oracle] oracle11g scan ip relocate
[root@xxxxxdb2 ~]# crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER  ...