分类 Blog 下的文章

Oracle正则表达式

正则表达式简介

正则表达式,又称规则表达式。(英语:Regular Expression,在代码中常简写为regex、regexp或RE),计算机科学的一个概念。正则表通常被用来检索、替换那些符合某个模式(规则)的文本。

正则表达式是对字符串(包括普通字符(例如,a 到 z 之间的字母)和特殊字符(称为“元字符”))操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。正则表达式是一种文本模式,模式描述在搜索文本时要匹配的一个或多个字符串。

正则表达式具体描述

QQ图片20170922221302.png

- 阅读剩余部分 -

Mysqld_multi Stop Bug

最近在做mysqld_multi管理多实例的时候,发现stop不了节点
这是什么原因呢?
多实例相关配置如下:

[mysqld_multi]  
mysqld     = /usr/local/mysql/bin/mysqld_safe  
mysqladmin = /usr/local/mysql/bin/mysqladmin
log = /usr/local/mysql/mysqld_multi.log
user       = root
password   = shunzi

[mysqld3306]  
socket     = /data/mysql3306/tmp/mysql3306.sock
port       = 3306  
user       = mysql

pid-file   = /data/mysql3306/mysql3306.pid  
datadir    = /data/mysql3306/data
tmpdir     = /data/mysql3306/tmp

[mysqld3307]  
socket     = /data/mysql3307/tmp/mysql3307.sock
port       = 3307  
user       = mysql

pid-file   = /data/mysql3307/mysql3307.pid  
datadir    = /data/mysql3307/data
tmpdir     = /data/mysql3307/tmp

- 阅读剩余部分 -

EXP-00091:Exporting questionable statistics

今天在oracle上做exp导出的时候报exp-00091;
查了下是服务端跟客户端的字符集不一致导致的

服务端字符集查询SQL:

select userenv('language') from dual;

执行过程如下:

E:\data>exp userid=mig/mig tables=T_CUSTOMER,T_PHONE,T_CUSTOMER_PHONE
 file=e:\data\pub.dump  log=e:\data\pub.log buffer=40960000 grants=n indexes=n t
riggers=n constraints=n

Export: Release 11.2.0.4.0 - Production on Tue Aug 29 15:50:24 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in UTF8 character set and UTF8 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
Note: grants on tables/views/sequences/roles will not be exported
Note: indexes on tables will not be exported
Note: constraints on tables will not be exported

About to export specified tables via Conventional Path ...
. . exporting table                   T_CUSTOMER    1320672 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table                      T_PHONE    1869331 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table             T_CUSTOMER_PHONE    1869331 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.

E:\data>echo $NLS_LANG
$NLS_LANG

E:\data>echo %NLS_LANG%
AMERICAN_AMERICA.UTF8

E:\data>set NLS_LANG=AMERICAN_AMERICA.AL32UTF8

E:\data>exp userid=mig/mig tables=T_CUSTOMER,T_PHONE,T_CUSTOMER_PHONE
 file=e:\data\pub.dump  log=e:\data\pub.log buffer=40960000 grants=n indexes=n t
riggers=n constraints=n

Export: Release 11.2.0.4.0 - Production on Tue Aug 29 15:55:25 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in AL32UTF8 character set and UTF8 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
Note: indexes on tables will not be exported
Note: constraints on tables will not be exported

About to export specified tables via Conventional Path ...
. . exporting table                   T_CUSTOMER    1320672 rows exported
. . exporting table                      T_PHONE    1869331 rows exported
. . exporting table             T_CUSTOMER_PHONE    1869331 rows exported
Export terminated successfully without warnings.

E:\data>

最后提一下,utf8跟al32utf8字符集是不一样的,好吧,mark一下!

极路由3刷openwrt固件

以前用极路由的原因是因为能够安装很多插件,其中做常用的是端口转发功能。
最近升级最新版后,发现端口转发功能不能用了,这样我就不能访问家里的开发环境了
然后果断放弃原固件,开始折腾openwrt

申请极路由开发者模式

登录极路由的云插件里申请,具体步骤请自行google

首先刷新万能不死uboot(breed)

这里用的是breed-mt7620-hiwifi-hc5761.bin(作者:hackpascal)

  • 下载bred软件,用winscp上传的路由器
  • ssh 连接路由器后,执行命令刷入

- 阅读剩余部分 -

Title - Artist
0:00