Archive for November, 2007

Nov 18 2007

顺时针 or 逆时针!

Published by kamus under Misc

旋转

好吧,各位看到的这个旋转的女士是在顺时针转呢还是在逆时针转?

我看了大概5分钟的顺时针,当我站远忽然间在某一刻变成了逆时针,然后持续了10秒左右,陡然又变成了顺时针,之后,顺时针逆时针转换了好几次,而在这段时间内,我弟看到的完全跟我不一样,所以并不是某些人怀疑的这是一个作弊的gif文件,就是有时候顺时针有时候逆时针。

据说看到逆时针的左半脑比较活跃,而看到顺时针的则是右半脑更活跃。

左半脑活跃的特点是:善于观察细节,逻辑性强,语言能力强,易于接受图像,制定策略,现实,喜欢安全感。

右半脑活跃的特点是:看到事情的整体图像,想像力好,喜欢梦想,哲学化和宗教化,有空间想像力,大胆。

No Tags

20 responses so far

Nov 17 2007

Make table readonly in Oracle11g

Published by kamus under Oracle RDBMS

一直以来总有人问,能够将Oracle数据库中的表设置成只读吗?在Oracle11g之前回答是,不能。HJR甚至写过一篇完整的文章来阐述这个问题。

Oracle11g终于带来了这个新特性,设置表为Readonly,简单的一个命令而已。

  1. SQL> CREATE TABLE "KAMUS"."T1" ( "N" NUMBER);
  2.  
  3. Table created
  4.  
  5. Executed in 0.047 seconds
  6.  
  7. SQL> alter table t1 read only;
  8.  
  9. Table altered
  10.  
  11. Executed in 0.125 seconds
  12.  
  13. SQL> insert into t1 values(1);
  14.  
  15. insert into t1 values(1)
  16.  
  17. ORA-12081: update operation not allowed on table "KAMUS"."T1"
  18.  
  19. SQL> alter table t1 read write;
  20.  
  21. Table altered
  22.  
  23. Executed in 0.015 seconds
  24.  
  25. SQL> insert into t1 values(1);
  26.  
  27. 1 row inserted
  28.  
  29. Executed in 0 seconds

Oracle一直在各个细节上不断地改善着,这是个值得信赖和继续投入热爱的产品。

One response so far

Nov 17 2007

Oracle11g for Windows ADRCI Issue

Published by kamus under Oracle RDBMS

ADRCI (ADR Command Interpreter) 无疑是DBA在11g中管理数据库跟以前最不一样的地方,当然其实本质上没什么不一样,只是一个崭新的工具进入DBA的日常工作总是让人感到很有兴趣。

但是Windows平台下的ADRCI却有个小陷阱,show alert恐怕是进入ADRCI命令行提示符下大多数DBA第一个会敲上去看一看的命令吧。

D:\Temp>adrci
 
ADRCI: Release 11.1.0.6.0 - Beta on Sat Nov 17 20:51:49 2007
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
ADR base = "d:\oracle"
adrci> show alert
 
Choose the alert log from the following homes to view:
 
1: diag\rdbms\orcl11g\orcl11g
2: diag\tnslsnr\leyzhang-cn\listener
Q: to quit
 
Please select option: 1
Output the results to file: c:\docume~1\leyzhang\locals~1\temp\alert_3108_2324_o
rcl11g_1.ado
'vi' is not recognized as an internal or external command,
operable program or batch file.
 
Please select option:

在windows平台下show alert仍然试图去调用vi命令,而很明显vi并不存在于windows操作系统中,因此show alert命令失败。

Ricky,我知道你是测试Solaris平台下11g的,那也谏言一下,在Windows平台下还是不应该默认去调用vi的吧。。。当然,这不是大问题,毕竟,show alert -tail还是可以用的,呵呵。

解决方法:
在执行adrci之前先设置EDITOR环境变量,比如设置成notepad。
set EDITOR=notepad

备注:
如果想在Windows下使用一系列UNIX下的命令,可以安装MKS Toolkit,很好用的一套程序,包括vi,ls,tail,touch,cat等等。

3 responses so far

Nov 17 2007

Oracle11g默认目录结构

Published by kamus under Oracle RDBMS

Oracle11g到现在为止应该算是正式发布了,基本上主流的操作系统平台版本都已经可以下载了。

在自己的机器上安装了一套for Windows 32bit的版本,在Windows平台下安装Oracle一如既往的简单和流畅,安装完软件,DBCA创建数据库,之后让我们来看一下Oracle11g默认的目录结构。

D:\oracle>dir
 Volume in drive D is Tools
 Volume Serial Number is 6317-CEA9
 
 Directory of D:\oracle
 
2007-11-17  20:05   
<DIR>          .
2007-11-17  20:05   
<DIR>          ..
2007-11-17  20:05   
<DIR>          admin
2007-11-17  19:55   
<DIR>          cfgtoollogs
2007-11-17  19:50   
<DIR>          diag
2007-11-17  20:05   
<DIR>          flash_recovery_area
2007-11-17  20:05   
<DIR>          oradata
2007-11-17  19:38   
<DIR>          product
               0 File(s)              0 bytes
               8 Dir(s)  14,540,394,496 bytes free

admin
目前存放创建数据库的脚本,以前的alertlog已经不在这个地方了。

cfgtoollogs
下面分了目录分别存放当运行dbca,dbua,emca,netca等图形化配置程序时的log。

diag
是一个重组之后的目录,详细看一下其中的子目录,基本上Oracle每个组件都有了自己单独的目录,在Oracle10g中我们一直诟病的log文件散放在四处的问题终于得到解决,无论是asm还是crs还是rdbms,所有组件需要被用来诊断的log文件都存放在了这个新的目录下。

D:\oracle\diag>dir
 Volume in drive D is Tools
 Volume Serial Number is 6317-CEA9
 
 Directory of D:\oracle\diag
 
2007-11-17  19:50   
<DIR>          .
2007-11-17  19:50   
<DIR>          ..
2007-11-17  19:50   
<DIR>          asm
2007-11-17  19:50   
<DIR>          clients
2007-11-17  19:50   
<DIR>          crs
2007-11-17  19:50   
<DIR>          diagtool
2007-11-17  19:50   
<DIR>          lsnrctl
2007-11-17  19:50   
<DIR>          netcman
2007-11-17  19:50   
<DIR>          ofm
2007-11-17  20:05   
<DIR>          rdbms
2007-11-17  19:50   
<DIR>          tnslsnr
               0 File(s)              0 bytes
              11 Dir(s)  14,534,791,168 bytes free

flash_recovery_area
在Oracle10g中就已经存在,没什么多说的。

oradata
存放数据文件。

product
仍然是Oracle RDBMS的软件存放目录。

No responses yet

Page 2 of 4«1234»