您的位置:首页 > 运维架构 > Linux

七月份学习的一些零散知识点

2013-07-31 23:20 387 查看
1.判断是否数值型

SELECT NVL(LENGTH(TRIM(TRANSLATE(v_str, ' +-.0123456789', ' '))), 0) FROM DUAL;

2.kettle部署的时候,出现如下警告:

[lubinsu@localhost data-integration]$ ./spoon.sh 

/home/lubinsu/soft/kettle/data-integration

Xlib: connection to ":0.0" refused by server

Xlib: Invalid MIT-MAGIC-COOKIE-1 key

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

        at org.eclipse.swt.SWT.error(Unknown Source)

        at org.eclipse.swt.widgets.Display.createDisplay(Unknown Source)

        at org.eclipse.swt.widgets.Display.create(Unknown Source)

        at org.eclipse.swt.graphics.Device.<init>(Unknown Source)

        at org.eclipse.swt.widgets.Display.<init>(Unknown Source)

        at org.eclipse.swt.widgets.Display.<init>(Unknown Source)

        at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:540)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)

--是图形访问权限的问题,我们需要先切换到root用户下

[ root@localhost data-integration]$ xhost local:lubinsu

3.运行kettle连接数据库时报错:

Error connecting to database [111] : org.pentaho.di.core.exception.KettleDatabaseException:

Error occured while trying to connect to the database

Exception while loading class

org.gjt.mm.mysql.Driver

org.pentaho.di.core.exception.KettleDatabaseException:

Error occured while trying to connect to the database

这个明显是驱动的问题,将OJDBC14.jar复制到kettle安装目录下即可:${KETTLE_HOME}\libext\JDBC

4.文件夹中文件数过多,无法使用 rm *.txt 可以用如下方法删除:

--删除所有文件

ls | xargs -n 10 rm -rf
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux kettle