随笔 - 79  文章 - 11  trackbacks - 0
<2009年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

不再堕落。
Oracle documents: 
http://tahiti.oracle.com/

常用链接

留言簿

随笔分类(66)

随笔档案(79)

相册

收藏夹(11)

搜索

  •  

积分与排名

  • 积分 - 51987
  • 排名 - 952

最新随笔

最新评论

阅读排行榜

     摘要:   阅读全文
posted @ 2009-07-16 22:33 donnie 阅读(289) | 评论 (0)编辑 收藏
http://www.oracle.com/technology/global/cn/products/timesten/index.html
posted @ 2009-06-22 16:34 donnie 阅读(200) | 评论 (0)编辑 收藏
http://r.book118.com/files/article/html/19/19931/index.htm
posted @ 2009-06-12 12:55 donnie 阅读(181) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-06-12 12:06 donnie 阅读(314) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-06-12 11:46 donnie 阅读(190) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-06-12 11:45 donnie 阅读(171) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 22:31 donnie 阅读(226) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 17:21 donnie 阅读(198) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 17:13 donnie 阅读(4519) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 16:53 donnie 阅读(189) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 16:49 donnie 阅读(176) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-12 16:46 donnie 阅读(167) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-08 12:06 donnie 阅读(282) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-08 12:05 donnie 阅读(3765) | 评论 (2)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-06 22:45 donnie 阅读(600) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-05 23:06 donnie 阅读(890) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-05 22:55 donnie 阅读(218) | 评论 (1)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-05 22:31 donnie 阅读(136) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-05 22:27 donnie 阅读(95) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-05-05 22:23 donnie 阅读(136) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 17:48 donnie 阅读(2780) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 17:03 donnie 阅读(236) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 15:12 donnie 阅读(332) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 15:09 donnie 阅读(133) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 14:41 donnie 阅读(333) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 11:48 donnie 阅读(987) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-28 11:32 donnie 阅读(988) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-24 21:43 donnie 阅读(232) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-24 21:43 donnie 阅读(435) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-24 11:39 donnie 阅读(276) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-24 10:54 donnie 阅读(245) | 评论 (0)编辑 收藏
巧用虚拟股权留住人心
天津B公司:虚拟股份制 
虚拟股权激励方案设计
posted @ 2009-04-23 11:25 donnie 阅读(134) | 评论 (0)编辑 收藏

http://www.hadoop.org/
The Apache Hadoop project develops open-source software for reliable, scalable, distributed computing, including:

  • Hadoop Core, our flagship sub-project, provides a distributed filesystem (HDFS) and support for the MapReduce distributed computing metaphor.
  • HBase builds on Hadoop Core to provide a scalable, distributed database.
  • Pig is a high-level data-flow language and execution framework for parallel computation. It is built on top of Hadoop Core.
  • ZooKeeper is a highly available and reliable coordination system. Distributed applications use ZooKeeper to store and mediate updates for critical shared state.
  • Hive is a data warehouse infrastructure built on Hadoop Core that provides data summarization, adhoc querying and analysis of datasets.
posted @ 2009-04-17 15:20 donnie 阅读(132) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-17 11:02 donnie 阅读(350) | 评论 (0)编辑 收藏

http://www.hadoop.org/
The Apache Hadoop project develops open-source software for reliable, scalable, distributed computing, including:

  • Hadoop Core, our flagship sub-project, provides a distributed filesystem (HDFS) and support for the MapReduce distributed computing metaphor.
  • HBase builds on Hadoop Core to provide a scalable, distributed database.
  • Pig is a high-level data-flow language and execution framework for parallel computation. It is built on top of Hadoop Core.
  • ZooKeeper is a highly available and reliable coordination system. Distributed applications use ZooKeeper to store and mediate updates for critical shared state.
  • Hive is a data warehouse infrastructure built on Hadoop Core that provides data summarization, adhoc querying and analysis of datasets.
posted @ 2009-04-17 10:32 donnie 阅读(123) | 评论 (0)编辑 收藏
http://rdc.taobao.com/blog/dw/archives/286
posted @ 2009-04-17 10:27 donnie 阅读(161) | 评论 (0)编辑 收藏
http://www.hadoop.org/
http://cn.hadoop.org/
posted @ 2009-04-17 10:26 donnie 阅读(145) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-13 21:15 donnie 阅读(126) | 评论 (0)编辑 收藏

A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'


from:  http://tkyte.blogspot.com/

posted @ 2009-04-06 17:03 donnie 阅读(105) | 评论 (0)编辑 收藏
select to_date('Mon Jan 21 13:25:47 2008', 'dy mon dd hh24:mi:ss yyyy') from dual
Ora-01846: not a valid day of the week
出现的是中文的字符日期,如下:星期五 12月 19 13:53:15 2008
 是字符集的问题,解决:
alter session set nls_date_language = 'American'
posted @ 2009-04-06 16:00 donnie 阅读(1113) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2009-04-06 11:50 donnie 阅读(146) | 评论 (0)编辑 收藏
http://v.youku.com/v_playlist/f2076316o1p28.html
posted @ 2009-04-04 18:26 donnie 阅读(113) | 评论 (0)编辑 收藏
http://edu.136z.com/DataBase/32042.html

目录

一、       前言... 4

二、       思路... 4

三、       vmstat脚本及步骤... 4

1.       安装statspack. 4

2.       创建stats$vmstat表... 4

3.       创建vmstat目录... 6

4.       创建get_vmstat.ksh脚本... 6

5.       创建run_vmstat.ksh脚本... 8

6.       创建crontab作业,定时执行run_vmstat.ksh脚本... 9

7.       分析数据... 9

1)    异常报告... 9

2)    每小时趋势报告... 13

3)    周趋势报告... 14

4)    长期趋势报告... 14

四、       使用Excel生成趋势图... 15

五、       参考资料... 15
posted @ 2009-04-02 10:46 donnie 阅读(126) | 评论 (0)编辑 收藏
 改用传统的pfile方式启动,具体pfile的内容可从spfile文件中copy,或者从数据库的警告日志文件中获取。
posted @ 2009-03-30 22:32 donnie 阅读(215) | 评论 (0)编辑 收藏

在oracle中,NULL与NULL既不相等,也不完全不相等。SQL Server与Sybase中,NULL等于NULL.
--REF: oracle expert....

 

scott@ORCL> select * from dual where null=null;

未选定行

scott
@ORCL> select * from dual where null <> null;

未选定行

scott
@ORCL> select * from dual where null is null;

D
-
X
posted @ 2009-03-27 22:47 donnie 阅读(110) | 评论 (0)编辑 收藏
scott@ORCL> select count(*from t;

  
COUNT(*)
----------
        28

scott
@ORCL> begin
  
2     for x in (select * from t)
  
3     loop
  
4        insert into t values (x.username,x.user_id,x.created);
  
5     end loop;
  
6   end;
  
7  /

PL
/SQL 过程已成功完成。

scott
@ORCL> select count(*from t;

  
COUNT(*)
----------
        56
posted @ 2009-03-26 23:18 donnie 阅读(114) | 评论 (0)编辑 收藏
SET SERVEROUTPUT ON;

DECLARE
   stock_price 
NUMBER := 9.73;
   net_earnings 
NUMBER := 0;
   pe_ratio 
NUMBER;
BEGIN
-- Calculation might cause division-by-zero error.
   pe_ratio := stock_price / net_earnings;
   dbms_output.put_line(
'Price/earnings ratio = ' || pe_ratio);

EXCEPTION  
-- exception handlers begin

-- Only one of the WHEN blocks is executed.

   
WHEN ZERO_DIVIDE THEN  -- handles 'division by zero' error
      dbms_output.put_line('Company must have had zero earnings.');
      pe_ratio :
= null;

   
WHEN OTHERS THEN  -- handles all other errors
      dbms_output.put_line('Some other kind of error occurred.');
      pe_ratio :
= null;

END;  -- exception handlers and block end here
/
ref : http://www.sc.ehu.es/siwebso/KZCC/Oracle_10g_Documentacion/appdev.101/b10807/07_errs.htm
posted @ 2009-03-25 10:52 donnie 阅读(91) | 评论 (0)编辑 收藏
scott@ORCL> connect / as sysdba
已连接。
sys
@ORCL> grant execute on dbms_flashback to scott;

授权成功。

sys
@ORCL> connect scott/tiger
已连接。
scott
@ORCL> variable SCN number
scott
@ORCL> exec :scn := sys.dbms_flashback.get_system_change_number

PL
/SQL 过程已成功完成。

scott
@ORCL> print scn

       SCN
----------
    762534

scott
@ORCL> select count(*from emp;

  
COUNT(*)
----------
        14

scott
@ORCL> delete from emp;

已删除14行。

scott
@ORCL> select count(*from emp;

  
COUNT(*)
----------
         0

scott
@ORCL> select count(*from emp AS OF SCN :scn;

  
COUNT(*)
----------
        14

scott
@ORCL> commit;

提交完成。

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
         0         14

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
         0         14

scott
@ORCL> alter table emp enable row movement;

表已更改。

scott
@ORCL> flashback table emp to scn :scn;

闪回完成。

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
        14         14

scott
@ORCL>
posted @ 2009-03-24 22:58 donnie 阅读(295) | 评论 (1)编辑 收藏
scott@ORCL> drop table t;

表已删除。

scott@ORCL
>
scott@ORCL
> create table t
  
2  as
  
3  select *
  
4    from all_users;

表已创建。

scott@ORCL
>
scott@ORCL
> variable x refcursor
scott@ORCL
>
scott@ORCL
> begin
  
2     open :x for select * from t;
  
3  end;
  
4  /

PL
/SQL 过程已成功完成。

scott@ORCL
> delete from t;

已删除28行。

scott@ORCL
>
scott@ORCL
> commit;

提交完成。

scott@ORCL
>
scott@ORCL
> print x

USERNAME                          USER_ID CREATED
------------------------------ ---------- --------------
BI                                     
60 13-3月 -09
PM                                     
59 13-3月 -09
SH                                     
58 13-3月 -09
IX                                     
57 13-3月 -09
OE                                     
56 13-3月 -09
HR                                     
55 13-3月 -09
SCOTT                                  
54 30-8月 -05
MGMT_VIEW                              
53 30-8月 -05
MDDATA                                 
50 30-8月 -05
SYSMAN                                 
51 30-8月 -05
MDSYS                                  
46 30-8月 -05
SI_INFORMTN_SCHEMA                     
45 30-8月 -05
ORDPLUGINS                             
44 30-8月 -05
ORDSYS                                 
43 30-8月 -05
此处 open 不复制任何数据,只是在你获取数据时它才从表中读数据。
posted @ 2009-03-24 22:46 donnie 阅读(112) | 评论 (0)编辑 收藏
http://blogs.sun.com/chrisoliver/entry/javafx_vs_actionscript_performance
posted @ 2009-03-23 15:34 donnie 阅读(145) | 评论 (0)编辑 收藏

demo:   https://openjfx.dev.java.net/

posted @ 2009-03-23 11:58 donnie 阅读(117) | 评论 (0)编辑 收藏
sudo passwd root;
posted @ 2009-03-19 23:44 donnie 阅读(93) | 评论 (0)编辑 收藏
This solution worked perfectly for me: http://www.insecure.ws/2008/10/20/vm...nd-kernel-2627
add this patch: vmware-update-2.6.27-5.5.7-2
posted @ 2009-03-18 22:23 donnie 阅读(485) | 评论 (2)编辑 收藏
$sudo apt-get install scim scim-modules-socket scim-modules-table scim-pinyin scim-tables-zh scim-gtk2-immodule scim-qtimm
$sudo im-switch -s scim
重新启动Xwindow完成。按 Ctrl + 空格 键激活输入法。

posted @ 2009-03-18 14:56 donnie 阅读(326) | 评论 (0)编辑 收藏
sudo apt-get install  linux-restricted-modules-2.6.27-11-server
sudo apt-get install  linux-headers-server
sudo apt-get install  linux-image-server linux-server
--it works.

posted @ 2009-03-18 14:54 donnie 阅读(176) | 评论 (0)编辑 收藏
sudo apt-get install pidgin
——————————————————————
pidgin是一个多协议的聊天工具,只要你有对应的帐户,就可以同时和几个帐户下的好友同时聊。
 按提示添加帐户就行了。
posted @ 2009-03-17 21:35 donnie 阅读(152) | 评论 (0)编辑 收藏
系统-系统管理-软件源,choose chinese site to get higher speed.
posted @ 2009-03-17 21:14 donnie 阅读(152) | 评论 (0)编辑 收藏
http://msdn.microsoft.com/en-us/library/aa366778.aspx#physical_memory_limits_windows_xp
posted @ 2009-03-17 16:40 donnie 阅读(7804) | 评论 (1)编辑 收藏
需以sysdba身份连接才能安装。
1,cd [oracle_home]\rdbms\admin;
2,run  @spcreate.sql;
按提示输入必要的信息。
如果输入错误或者取消了安装,下次安装前需要先执行 spdrop.sql删除用户和已安装的视图。
--SPCPKG complete. Please check spcpkg.lis for any errors.
posted @ 2009-03-16 22:47 donnie 阅读(83) | 评论 (0)编辑 收藏
1,cd  [oracle_home]\rdbms\admin;
2, run  @utlxplan;
3, create public synonym plan_table to public; --no need to run in oracle10,oracle default
4, grant all on plan_table to public;--no need to run in oracle10,oracle default, here public can be any user;
----create role plustrace and grant it to user
1, cd [oracle_home]\sqlplus\admin;
2, conn sqlplus as sysdba;
3, run @plustrce;
4, grant plustrace to public;
---test
 1, conn sqlplus with user scott;
1.1, set autotrace on; 
 2, run : select * from dual;
 3, show stat info;
--1.1 可选项: set autotrace off: 不生成报告,默认;
                           set autotrace on explain: 报告只显示优化器执行路径;
                           set autotrace on statistics: 报告只显示sql语句执行统计信息;
                           set autotrace on: 报告显示优化器执行路径,sql语句统计信息;
                            set autotrace traceonly: 报告显示优化器执行路径,sql语句统计信息,不显示查询输出;

                          
ref:oracle 9i、10g编程艺术。

                         


posted @ 2009-03-16 22:35 donnie 阅读(95) | 评论 (0)编辑 收藏
ref:oracle 9i、10g编程艺术。
   sqlplus允许建立一个login.sql,通过设置环境变量SQLPATH,指向文件所在目录,每次启动sqlplus都会执行这个脚本。
login.sql例子:

 

    
define _editor
=notepad
set serveroutput on size 1000000
set trimspool on
set long 5000
set linesize 100
set pagesize 9999
column plan_plus_exp format a80
column global_name new_value gname
set termout off
define gname
=idle
column global_name new_value gname
select lower(user|| '@' || substr( global_name, 1, decode( dot, 0,
length(global_name), dot
-1) ) global_name
  
from (select global_name, instr(global_name,'.') dot from global_name );
set sqlprompt '&gname> '
set termout on

 

define _editor: sqlplus默认的编辑器;
set serveroutput on size 1000000:默认打开DBMS_OUTPUT,将缓冲区设置尽可能大;
posted @ 2009-03-16 22:07 donnie 阅读(274) | 评论 (0)编辑 收藏
现象:
sys@ORCL> grant select on v$session to scott;
grant select on v$session to scott
                *
第 1 行出现错误:
ORA-02030: 只能从固定的表/视图查询

解决:
 grant select on v_$session to  scott;
posted @ 2009-03-16 21:59 donnie 阅读(816) | 评论 (0)编辑 收藏
  HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayer\SafeVersions]
将"9.0",“10.0” 项删除,重新安装。
posted @ 2009-03-16 15:31 donnie 阅读(2911) | 评论 (2)编辑 收藏
http://www.centospub.com/
CentOS 是 RHEL(Red Hat Enterprise Linux)源代码再编译的产物,而且在 RHEL 的基础上修正了不少已知的 Bug ,相对于其他 Linux 发行版,其稳定性值得信赖。

CentOS 4.4 的下载及安装
http://www.centospub.com/make/install.html
从镜像站点上下载ISO的镜像文件

    CD 1 : http://mirror.tini4u.net/centos/4.4/isos/i386/CentOS-4.4-i386-bin1of4.iso
    CD 2 : http://mirror.tini4u.net/centos/4.4/isos/i386/CentOS-4.4-i386-bin2of4.iso
    CD 3 : http://mirror.tini4u.net/centos/4.4/isos/i386/CentOS-4.4-i386-bin3of4.iso
    CD 4 : http://mirror.tini4u.net/centos/4.4/isos/i386/CentOS-4.4-i386-bin4of4.iso
    md5校验码:http://mirror.tini4u.net/centos/4.4/isos/i386/md5sum

    将上面所有文件(包括md5校验码)下载到同一个目录(文件夹)下。(这里,选择了从CentOS的韩国镜像站上下载。根据具体位置可以选择距离近、速度快的景象站点。查找CentOS的镜像请见官方镜像站点列表。)
posted @ 2009-03-13 13:20 donnie 阅读(101) | 评论 (1)编辑 收藏