exp导出命令query参数指定的where条件里符号也要转义
小叶同学今早又来问题了,还是exp的问题,本来很简单的问题,这家伙太懒了,遇到问题都不先自己多测试几次,直接就开问,打算把他的问题全部都记录起来首先是这个截图的问题,原因是 query里面 1=1,没有where关键字接下来问题又来了,如下:这里面有两个问题:1,exp命令最后还加了个“;”号2,query里面的特...
sqlldr加载数据时rows参数不生效
小叶同学在使用sqlldr加载数据时,觉得commit次数太多了,想加载更多行后再commit一次,而不是默认的每64行commit一次我提醒他使用rows参数可以控制多少行提交一次结果他加上rows=1000后,没有生效,如下图:我在自己机器上测试,rows参数是生效的,如下:[oracle@goolen goolen]$ seq 1 10000 > id.txt[oracle@goo...
exp导出报错ORA-00904
小叶同学用exp导出数据,加了query参数,结果命令执行报ORA-00904错误如果query在命令行直接指定的话,所有的特殊字符都需要做转义的,如果是放到参数文件里,就无需转义了简单的做个测试:[oracle@goolen goolen]$ exp userid=scott/tiger tables=emp file=./a.dmp query=\'where ename='SCOTT'\'Export: Release 10.2...
Fatal error: The master and slave have equal MySQL server UUIDs
装了一套mysql5.6测试用,配置主从的时候,为了方便,直接拷贝的主库的mysql目录到备库的查看slave状态的时候发现报错如下:Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work查看文档发现mysq...
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated
MySQL 5.6启动的时候提示警告信息如下:2014-12-20 08:02:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).警告信息说timestamp的默认值设置被废弃了,需要配置explicit_defaults_for_ti...
cannot fetch plan for SQL_ID: 9babjv8yq8ru3, CHILD_NUMBER: 0
在查看执行计划的时候,总是报错模拟环境如下:SQL> show user;USER is "SCOTT"SQL> select count(*) from emp; COUNT(*)---------- 14SQL> select * from table(dbms_xplan.display_cursor(null,null,'allstats last'));PLAN_TABLE_OUTPUT--------------------------------...
MySQL分区处理null值的方式
range分区表:mysql> create table goolen( -> id int , -> name varchar(35) -> ) engine=innodb -> partition by range(id) ( -> partition p0 values less than (10), -> partition p1 values less than (20), -> ...
ORA-03264: cannot drop offline datafile of locally managed tablespace
有个哥们在添加数据文件的时候,指错了表空间,然后把新加的datafile offline drop,接着在操作系统上rm了这个文件,他以为这样就能完整的删掉这个文件了,结果回到数据库里查询,发现这个文件还存在,再想添加同名的文件或者drop 这个datafile 都会报错,其实现在不去管这个文件,继续添加别的文件,库也能正常工作,但是...
linux下编译安装php
下载安装包:[root@goolen goolen]# ls php-5.6.3.tar.gz php-5.6.3.tar.gz[root@goolen]# tar zxfv php-5.6.3.tar.gz [root@goolen php-5.6.3]# cd php-5.6.3 [root@goolen php-5.6.3]# make ; make install[root@goolen php-5.6.3]#./configure --prefix=/usr/local/p...
httpd: Could not reliably determine the server's fully qualified domain name
启动http服务的时候出现警告信息:[root@goolen ~]# service httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.100.50 for ServerName解决方法:编辑http配置文件:[root@goolen ~]# vim /etc/httpd/conf/httpd.conf找到如下内容:#Serv...
Hang Waiting for table metadata lock
刚刚开发来找我,说他用客户端工具对表添加字段的时,点击保存就一直卡着等到服务器上,show processlist 看了一下,很多类似的session| 1041480 | root | 192.168.100.220:56387 | helpservicesystem | Query | 54 | Waiting for table metadata lock &n...
innodb_log_file_size参数配置导致xtrabackup备份失败
用xtrabackup做mysql库的增量备份时报错如下:xtrabackup: innodb_log_file_size = 5242880InnoDB: Error: log file ./ib_logfile0 is of different size 0 524288000 bytesInnoDB: than specified in the .cnf file 0 5242880 bytes!innobackupex: Error: The xtrabackup child process has died at /usr/local...
大批量删除没有任何索引的大表数据导致备库复制延迟
昨天和今天都碰到了同样的问题,内网mysql备库上SQL线程一直停留在某个position上很长一段时间:mysql> show slave status\G。。。Exec_Master_Log_Pos的值一直不变,Seconds_Behind_Master的值在不停的网上升mysql> show slave status\G;*************************** 1. row *************************** &...
E212: Can't open file for writing
刚刚用root编辑一个文件[root@php-11 ~]# vim /tol/task/dump_weixinnew_everyday.sh完事后想要保存退出,但是一直报错,不让保存,很纳闷了,root都没权限保存检查一下磁盘空间,还剩余很多再检查才发现编辑的这个文件所在的路径task目录不存在导致,创建task目录后就可以保存了很有意思,记录一下[root@php-11 ~...
xtrabackup-安装
安装 http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.6/binary/Linux/x86_64/[root@goolen ~]# ls percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz[root@goolen ~]# tar zxfv percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz ...
percona-toolkit系列-pt-find
pt-find - Find MySQL tables and execute actions, like GNU find.用法:pt-find [OPTION...] [DATABASE...]例子:找出创建于一天之前,并且是myisam存储引擎的表[root@goolen ~]# pt-find --ctime +1 --engine MyISAM -uroot -proot`mysql`.`db``mysql`.`event``mysql`.`func``mysql`.`help_category``mysql...
用sed和echo处理文本
最近有个朋友要处理一些文本数据原始数据大概如下:[root@goolen goolen]# cat haiqing.log a,b,c,d,20141123,121010a,b,c,d,20141124,121011a,h,d,d,20141125,121012a,g,g,w,20141126,121013a,d,h,e,20141127,121014a,x,u,r,20141128,121015他需要把把后面的日期改为yyyy-mm-dd的格式,时间改为HH:MI:SS的...
percona-toolkit系列-pt-archiver
pt-archiver工具其实就是用来清理,归档数据用的下面列举了三种常用的功能1,只清理数据mysql> use sbDatabase changedmysql> select * from sb2;+----+------+| id | name |+----+------+| 1 | a || 2 | b || 3 | c || 4 | d |...
ORA-31633: unable to create master table "NEWCOURSE.JOB_48"
早上来公司,发现内网同步的数据失败了,检查了一下日志,报错信息如下:ORA-31626: job does not existORA-31633: unable to create master table "NEWCOURSE.JOB_48"ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95ORA-06512: at "SYS.KUPV$FT", line 1020ORA-00955: name is already used by an existing object同...
percona-toolkit系列-pt-align
pt-align这个工具用于对文件格式进行格式化输出例子:对比align文件格式化输出前后,文件格式的不同[root@goolen goolen]# pt-align --helppt-align aligns output from other tools to columns. If no FILES are specified,STDIN is read. For more details, please use the --help option, or try 'p...