随笔 - 79  文章 - 11  trackbacks - 0
<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

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

常用链接

留言簿

随笔分类(66)

随笔档案(79)

相册

收藏夹(11)

搜索

  •  

积分与排名

  • 积分 - 51991
  • 排名 - 952

最新随笔

最新评论

阅读排行榜

     摘要:   阅读全文
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)编辑 收藏
仅列出标题
共8页: 上一页 1 2 3 4 5 6 7 8 下一页