自动重建失效普通索引和分区索引
只为了做的更好创建一个JOB调度下面过程就可以自动把失效索引重建create or replace procedure re_index Authid Current_User is name_index varchar2(50); v_sql_reInd varchar2(1000); v_sql_reInd2 varchar2(1000); ind_par...
自动化RMAN脚本
#!/bin/bash# chkconfig: 345 99 10# description: script for the SMS MESSAGE OR Oracle Instance, Listener#Choose to run the script by week#The script will automatically choose the backup level#software make : muxinqingtime=$(date +%A)ora=$(ps -aux | grep ora | grep -v "grep" | wc -l)ca...
ASM磁盘头
那么也就是AU 1M的磁盘组头块备份在第510个块上,而AU 8M的磁盘组头块备份在第4094个块上,备份块的存储位置有规律吗?有的,始终保存在第2个AU的倒数第2个块上。下面来验证这个观点。对于默认的磁盘组,AU Size=1M,每个AU中可以存储256个块,块号为0-255。第1个AU存储256个块,第2个AU最后1个块...
autoswitch Datagurad script
分享给有需要的人下面脚本通过网络判断主机是否被关机来执行自动切换autoswitch Datagurad scriptautodg.sh#!/bin/bashif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binumask 022PATH=/bin:/usr/bi...
innobackupex备份恢复实战
#innobackupex --user=root --password=root --host=172.17.210.112 --parallel=4 --throttle=400 --stream=tar /home 2>/home/bakup.log 1>/home/allbakup.tar [root@ykt ~]# innobackupex --user=root --defaults-file=/etc/my.cnf --host=192.168.0.200 --parallel=2 --throttle=400 --databases=yktg...
IN和EXISTS用法
SQL中IN和EXISTS用法的区别1.exist,not exist一般都是与子查询一起使用. In可以与子查询一起使用,也可以直接in (a,b.....)2.exist会针对子查询的表使用索引. not exist会对主子查询都会使用索引. in与子查询一起使用的时候,只能针对主查询使用索引. not in则不会使用任何索引. 注意,一直以来认为exists比in效率...
解决Error (1133): Can’t find any matching row in the user table
解决Error (1133): Can’t find any matching row in the user tablemysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'120.198.127.20' IDENTIFIED BY '' WITH GRANT OPTION;Error (1133): Can’t find any matching row in the user table解决方法就是把小写功能给关掉,这里让我饶不少弯路。在这此我特意记录下...
Mysql5.6 Master+Master
Mysql5.6 Master+Master 环境: 操作系统:rehat 6.0 MySQL版本:5.6 主服务器IP:192.168.0.250 从服务器IP:192.168.0.252 实现目标:主从两台机器MySQL数据双向同步 数据库准备工作 分别A,B在两台服务器上执行锁表操作: mys...
MySQL表分区管理
MySQL表分区管理一、什么是表分区 通俗地讲表分区是将一大表,根据条件分割成若干个小表。mysql5.1开始支持数据表分区了。如:某用户表的记录超过了600万条,那么就可以根据入库日期将表分区,也可以根据所在地将表分区。当然也可根据其他的条件分区。 ...
MYSQL常用函数
一、数学函数 ABS(x) 返回x的绝对值 BIN(x) 返回x的二进制(OCT返回八进制,HEX返回十六进制) CEILING(x) 返回大于x的最小整数值 EXP(x) 返回值e(自然对数的底)的x次方 FLOOR(x) 返回小于x的最大整数值 GREATE...
UDEV规则参数详细解释使用
Udev 的使用--linux系统创建设备节点 Linux 里都是以设备文件的形式存在。在早期的 Linux 版本中,/dev目录包含了所有可能出现的设备的设备文件。但因为这样 Linux 用户很难在这些大量的设备文件中找到匹配条件的设备文件。现在 udev 只为那些连接到 Linux 操作系统的设备产生设备文件。并且 udev 能通过定义一个 ...
mysqldump导出参数详细解释
C:\Users\Administrator>mysqldump --helpmysqldump Ver 10.13 Distrib 5.5.36, for Win64 (x86)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their res...
MYSQL解决error: 'Access denied for user 'root'@'localhost' (using password:
MYSQL解决error: 'Access denied for user 'root'@'localhost' (using password: YES)'问题原因:平时没有开起来mysql服务,开起来就报这个错误 MYSQL版本:5.6C:\Users\Administrator>mysqlERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)C:\Users\Administrator>cd C...
解决Mysql导入乱码问题
解决Mysql导入乱码问题方法一: 通过增加参数 –default-character-set = utf8 解决乱码问题 C:\Users\Administrator>mysql -uroot -p yktgl < F:\YIKATONG\application\gl.sql --default-character-set=utf8方法二: 在命令行导入乱码解决1.mysql>use gl; 2.mysql> set names utf8; 3.mysql>source example.sq...
LINUX经常使用命令详解
1.man 对你熟悉或不熟悉的命令提供帮助解释 eg:man ls 就能查看ls相关的用法注:按q键或ctrl+c退出,在linux下能使用ctrl+c终止当前程式运行1. 文件管理命令●名称:ls功能:列出当前目录下的文件和目录 ls(list)是个最常用的命令,用于显示当前目录下的文件和子目录。第一、显示当前目录的内...
MYSQL配置远程连接
资料整理与网络解决MySQL不允许从远程访问的方法开启 MySQL 的远程登陆帐号有两大步:1、确定服务器上的防火墙没有阻止 3306 端口。MySQL 默认的端口是 3306 ,需要确定防火墙没有阻止 3306 端口,否则远程是无法通过 3306 端口连接到 MySQL 的。如果您在安装 MySQL 时指定了其他端口,请在防火墙中...
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
/dev/hdb1 is apparently in use by the system; will not make a filesystem here!解决方法 [root@localhost ~]# mkfs.ext3 /dev/sdb1mke2fs 1.39 (20-May-2013)/dev/hdb1 is apparently in use by the system; will not make a filesystem here! [root@localhost ~]# mkfs.ext3 /dev/sdb1mke2fs 1...
Tkprof命令输出的解释:
Tkprof命令输出的解释:用法:tkprof tracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ] [sort= ]参数说明:tracefile:你要分析的trace文件outputfile:格式化后的文件explain=user/password@connectstringtable=schema.tablename这两个参数是一起使用的,通过连接数据库对在trace文件中...
linux ntp时间同步
一、搭建时间同步服务器1、编译安装ntp serverrpm -qa | grep ntp若没有找到,则说明没有安装ntp包,从光盘上找到ntp包,使用rpm -Uvh ntp***.rpm进行安装2、修改ntp.conf配置文件1. restrict <IP 地址><子网掩码>|<网段> <子网掩码> [ ignore|nomodify|noquery|notrap|notrust|nokod ]: 指定可以进行NTP通信的IP...
11G R2 ASM启动方法
[grid@his2 ~]$ ocrconfig -local -export /home/grid/lor.log><orcl:CSS-Profile id="css" DiscoveryString="+asm" LeaseDuration="400"/><orcl:ASM-Profile id="asm" DiscoveryString="/dev/*" SPFile="+ORACRS/his-scan/asmparameterfile/registry.253.848581099"/><ds:Signature可以看到该ASM SPFILE共有1份镜...