ORA-00119: invalid specification for system parameter LOCAL_LISTENER
好长没有安装oracle了,今天安装一套11g的库,启动报错如下:SQL> startupORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instanceORA-00119: invalid specification for system parameter LOCAL_LISTENERORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=kvm-image)(PORT=15...
ORA-39038
今天一朋友说expdp导出数据报错,模拟如下:[oracle@goolen ~]$ expdp system/oracle directory=dump_dir exclude=schema:"in\(\'user1\',\'user2\',\'user3\'\)" dumpfile=a.dmp Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 18 September, 2014 13:39:06Copyright (c) 2003, 2007, Oracle. ...
varchar类型的字段存储纯数字的排序
如果表字段的类型为varchar型,但是里面存储的是纯数字,怎么实现按照数字的大小来排序?下面的方法对于mysql和oracle都实用order by 字段+0order by 字段*1等等都可以实现例子:Mysql:mysql> select * from goolen;+------+| id |+------+| 1 || 2 || 3 ||...
Mysql里特殊的排序方法
刚刚遇到个特殊需求,如下查询,先根据ddate和money排序查询出10条数据,但是如果查询出来的记录的id中包含特殊id,如vip会员的id,需要排序到最前面;mysql> select id,money,ddate,type,size from pincome order by ddate desc,money desc limit 10; +...
注意Oracle与Mysql中的null值
在mysql中,null与''是不相同的,''会插入一个空字符串mysql> select version();+------------+| version() |+------------+| 5.5.18-log |+------------+1 row in set (0.00 sec)mysql> create table goolen (name varchar(10) primary key); Query OK, 0 rows affected (0.03 sec)mysql> insert i...
master and slave have equal MySQL server ids
今天看到一网友在群里发的mysql从库无法进行同步,查看状态,报如下错误:Slave_IO_Running: NoSlave_SQL_Running: YesLast_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same...
File './mysql-bin.index' not found (Errcode: 13)
今天做一个mysql的备机,拷贝数据的过程出现了一点点权限问题,记录一下数据copy完成之后启动备库[root@localhost data]# /etc/init.d/mysql startStarting MySQL (Percona Server).The server quit without upd[FAILED]D file (/tol/mysql/data/localhost.localdomain.pid).查看错误日志[root@localhost data]# cat...
PHP编译报错configure: error: Cannot find libmysqlclient under /usr.
今天编译PHP的时候遇到了几个错误,记录一下第一次编译的时候报错如下:configure: error: mcrypt.h not found. Please reinstall libmcrypt.报这个错是因为没有安装libmcrypt这个包,下载地址如下:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz安装:[root@localhost a...
linux系统上怎么从tar包里解压单个文件
前天有个朋友QQ问我怎么从一个tar压缩包里解压一个文件,而不是全部解压这几天实在是太忙了,今早抽个时间给他做了个示范,也顺便记录一下,希望能帮到一些朋友。首先我创建了一个tar包:[oracle@goolen test]$ ls -ltotal 80084-rw-r--r-- 1 oracle oinstall 81998360 Jul 30 09:52 test.tar.gz我们要想解压tar包...
mysqldump: Got error: 1146: Table
今早想对我的mysql测试哭做个备份的时候出现错误如下:[root@meizi ~]# mysqldump -uroot -p goolen > goolen.sql Enter password: mysqldump: Got error: 1146: Table 'goolen.ggschkpt' doesn't exist when using LOCK TABLES[root@meizi ~]# mysql -uroot -pEnter password: ...
彻底搞明白find命令的-mtime参数的含义
以前一直没有弄明白find的 -mtime参数的真正含义刚好今天跟一个同学聊起这个事我在写shell脚本的时候,定时删除一些文件的时候,也经常用得到-mtime这个参数,所以打算好好看看,把它弄明白一下man find里的解释:-mtime nFile’s data was last modified n*24 hours ago. See the comments for &n...
Table already exists error when the table does not exist
今天在一套mysql的库里发现一个问题,要创建一个表的时候,提示这个表已经存在,要drop的时候,提示此表不存在mysql> CREATE TABLE cms_attach_source (id int); ERROR 1050 (42S01): Table '`koo_cms`.`cms_attach_source`' already existsmysql>&...
log file switch (checkpoint incomplete)
早上开发的过来找我,说连接内网测试库的时候特别慢,偶尔还会超时我ping了一下网络,没有问题登录到机器上,直接sqlplus连接,同样的连接很慢查看了一下CPU和负载信息,没有问题检查了监听,监听日志,DNS/hosts解析,也没有问题iostat查看了一下磁盘IO,发现sdb1 的IO很高,那连接慢,估计就是因为IO高导致的因为最...
查看表数据的DML时间
今早来上班看到 “@夜无伤” 在群里发的消息,说是可以查看表数据的最后DML时间隐约记得我之前看过相关的文章,查了下笔记,还是被我给找到了,今天重新拿出来实验一下SQL> select * from v$version where rownum=1;BANNER---------------------------------------------------------------------------------------...
mysql导入sql文件的时候报错Segmentation fault
今天用crontab定时同步一个用户的数据,发现脚本执行失败了错误日志如下:begin imp exam at: 2014-05-06 00:00:38/mysql/task/imp_exam_everyday.sh: line 4: 11989 Segmentation fault /mysql/app/mysql/bin/mysql -S /tmp/mysql_3301.sock -uroot -proot exam < /home/exam/exam.sqlend...
Error: 13, Can't get stat of 'import.data' (Errcode: 13)
mysqlimport导入数据的时候报错:[root@library xiaoming]# mysqlimport -uroot -pXXXXX -S /tmp/mysql_3301.sock --fields-terminated-by=" ," --columns=id,type,username,datetime,logtype klb /root/xiaoming/import.datamysqlimport: Error: 13, Can't get stat of '/root/xiaoming/import.data' (...
Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js
mongodb所在的目录权限被更改导致mongodb意外down机启动报错:Tue Apr 15 02:49:13.417 [journal] warning: open of lsn file failedTue Apr 15 02:50:25.482 [journal] In File::open(), ::open for '/tol/mongodb/data/journal/lsn' failed with errno:13 Permission deniedTue Apr 15 02:50:25.482 [journal...
创建存储过程报ORA-00904
刚刚开发的同事来找我,在内网数据库上为一个表添加了字段后,再创建存储过程时候报错,提示新加的这个字段无效Warning: Procedure created with compilation errors.SQL> show errorErrors for PROCEDURE CB_DATE_MODIFY:LINE/COL ERROR-------- -------------------------------------------------------...
delete from file$ where file#=5
+++此次测试在归档模式下进行,通过delete file#来清除dbfile记录SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /opt/a...
通过dblink查询数据,commit和rollbak按钮会变亮
刚刚开发的同事问我,为什么他执行一条普通的select语句,PL/SQL里的commit和rollback按钮会变亮,觉得请奇怪,也实验了一把,确实是这样网上搜了一下资料,发现其实是因为查询的表使用了dblink导致查询一下,确实是这样:挺有趣,记录一下,没有去深究这个问题,感觉影响不大,应该是开...