===========================================================
数据转换
===========================================================
The following rules govern the direction in which Oracle makes implicit datatype conversions:
1) During INSERT and UPDATE operations, Oracle converts the value to the datatype of the affected column.
2) During SELECT FROM operations, Oracle converts the data from the column to the type of the target variable.
3) When comparing a character value with a NUMBER value, Oracle converts the character data to NUMBER.
4) When comparing a character value with a DATE value, Oracle converts thecharacter data to DATE.
5) When you use a SQL function or operator with an argument of a datatype other than the one it accepts,
Oracle converts the argument to the accepted datatype.
6) When making assignments, Oracle converts the value on the right side of the equal sign (=) to the datatype of the target of the assignment on the left side.
7) During concatenation operations, Oracle converts from noncharacter datatypes to CHAR or NCHAR.
8) During arithmetic operations on and comparisons between character and noncharacter datatypes,
Oracle converts from any character datatype to a number, date, or rowid, as appropriate.
In arithmetic operations between CHAR/VARCHAR2 and NCHAR/NVARCHAR2, Oracle converts to a number.
9) Comparisons between CHAR/VARCHAR2 and NCHAR/NVARCHAR2 types may entail different character sets.
The default direction of conversion in such cases is from the database character set to the national character set.
hayyon
发表于:2006.09.14 19:47
::分类:
(
Oracle&Sap&AIX
)
::阅读:(57161次)
::
评论
(0)
===========================================================
compute 操作(sql*plus)
===========================================================
compute sum of bytes on pool
以pool字段为组,计算bytes字段的和值..
COMP[UTE] [function [LAB[EL] text] ...
OF {expr|column|alias} ...
ON {expr|column|alias|REPORT|ROW} ...]
function:
label 是显示,如:
COMPUTE SUM LABEL 'TOTAL' OF SALARY ON JOB_ID;
JOB_ID LAST_NAME SALARY
---------- ------------------------- ----------
AC_MGR Higgins 12000
********** ----------
TOTAL 12000
SA_MAN Zlotkey 10500
Cambrault 11000
Errazuriz 12000
Partners 13500
Russell 14000
********** ----------
TOTAL 61000
BREAK
BRE[AK] [ON report_element [action [action]]]
break on pool skip 1 以pool值跳过一行显示.
hayyon
发表于:2006.06.06 16:07
::分类:
(
Oracle&Sap&AIX
)
::阅读:(734次)
::
评论
(0)
===========================================================
mts模式下更新数据不要太久
===========================================================
mts模式下更新数据不要太久
最好不要超过45秒
查看全文
hayyon
发表于:2006.06.06 10:47
::分类:
(
Oracle&Sap&AIX
)
::阅读:(639次)
::
评论
(0)
===========================================================
dba_free_space
===========================================================
SQL> desc dba_free_space
Name Null? Type
----------------------------------------- -------- ----------------------------
TABLESPACE_NAME VARCHAR2(30)
FILE_ID NUMBER
BLOCK_ID NUMBER
BYTES NUMBER
BLOCKS NUMBER
RELATIVE_FNO NUMBER
SQL> create tablespace test datafile '/oracle/app/oradata/strmdb/test.dbf' size 1M autoextend off;
SQL> select tablespace_name,sum(bytes)/1024/1024 from dba_free_space
2 group by tablespace_name;
TABLESPACE_NAME SUM(BYTES)/1024/1024
------------------------------ --------------------
DRSYS 15.1875
INDX 24.9375
SYSTEM 57.75
TEST .9375
TOOLS 9.9375
UNDOTBS1 120.9375
USERS 24.9375
SQL> create table test (a varchar2(128)) tablespace test;
Table created.
SQL> insert into test select object_name from dba_objects;
6486 rows created.
SQL> commit;
Commit complete.
SQL> insert into test select * from test;
6486 rows created.
SQL> /
12972 rows created.
SQL> /
insert into test select * from test
*
ERROR at line 1:
ORA-01653: unable to extend table SYS.TEST by 8 in tablespace TEST
SQL> commit;
Commit complete.
SQL> select tablespace_name,sum(bytes)/1024/1024 from dba_free_space
2 group by tablespace_name;
TABLESPACE_NAME SUM(BYTES)/1024/1024
------------------------------ --------------------
DRSYS 15.1875
INDX 24.9375
SYSTEM 57.75
TOOLS 9.9375
UNDOTBS1 120.9375
USERS 24.9375
在dba_free_space视图中,当某个表空间满时,是看不到这个表空间的...
同样的,在dba_segments中,计算某个表空间已经使用了多少空间时,如果此表空间上面没有分配过表(使用空间),也是不会显示出来这个表空间的.
hayyon
发表于:2006.05.15 16:01
::分类:
(
Oracle&Sap&AIX
)
::阅读:(9142次)
::
评论
(1)
===========================================================
library cache pin solution
===========================================================
How does one diagnose and fix 'library cache pin' waits?
引自:
http://www.orafaq.com/faq/how_does_one_diagnose_and_fix_library_cache_pin_waits
查看全文
hayyon
发表于:2006.05.15 15:23
::分类:
(
Oracle&Sap&AIX
)
::阅读:(729次)
::
评论
(0)
===========================================================
What's blocking my lock?
===========================================================
hayyon
发表于:2006.05.10 09:12
::分类:
(
Oracle&Sap&AIX
)
::阅读:(1449次)
::
评论
(0)
===========================================================
系统自动生成的lob字段名
===========================================================
创建表时如果含有lob字段,并且没有对其命令时,Oracle对其数据段和索引段各自生成一个名字
查看全文
hayyon
发表于:2006.03.17 14:01
::分类:
(
Oracle&Sap&AIX
)
::阅读:(496次)
::
评论
(0)
===========================================================
long 字段的创建顺序和存储顺序
===========================================================
从col$表中查看long字段的创建顺序和存储顺序
查看全文
hayyon
发表于:2006.03.17 14:00
::分类:
(
Oracle&Sap&AIX
)
::阅读:(583次)
::
评论
(0)
===========================================================
number类型的存储
===========================================================
Oracle数据库中number类型数据在块中的存储 查看全文
hayyon
发表于:2006.03.16 17:23
::分类:
(
Oracle&Sap&AIX
)
::阅读:(595次)
::
评论
(0)
===========================================================
decode
===========================================================
DECODE ---"Oracle automatically converts the return
value to the same datatype as the first result.
If the first result has the datatype CHAR or
if the first result is null, then Oracle converts
the return value to the datatype VARCHAR2."
hayyon
发表于:2006.02.10 16:32
::分类:
(
Oracle&Sap&AIX
)
::阅读:(514次)
::
评论
(4)
===========================================================
rs6000 boot led indicator
===========================================================
PCI RISC/6000 systems use sounds and graphics to show the different phases of the boot process. For example, as soon as you power on the system, an audio beep is produced when the processor is found to be active, the PowerPC logo is shown when the system memory checking is completed, and Device logos are shown for all devices that have a valid address. At the end of the device logo display, if the system ROS is not corrupted, an audio beep is again produced.
hayyon
发表于:2006.02.10 09:35
::分类:
(
Oracle&Sap&AIX
)
::阅读:(451次)
::
评论
(0)
===========================================================
AIX5.2上装Oracle 9i遇到的错误。
===========================================================
昨天在AIX5.2上装Oracle 9i时遇到了一些错误。一个是oracle用户不能连接到本地的X11 Window。具体错误不记得了。找了很久都不知道原因。后来才发现原来是oracle用户的,profile不属于oracle用户而是属于root.难怪所设的变量都没有用了。真是一个失误。chown -R oracle:dba /oracle将其下的目录全改成oracle用户为OWNER。还有一个错误是不能makefile $ORACLE_HOME/rdbms/lib/ins_rdbms.mk文件。想了一下。本来认为是系统空间不足,当然当时也没有去查。因为其中有个人他说他遇到这种情况,不是空间的问题。他说要改什么东西。结果都不是。就是空间问题。我在安装oracle的目录增加了空间就OK了。
hayyon
发表于:2004.11.11 10:27
::分类:
(
Oracle&Sap&AIX
)
::阅读:(705次)
::
评论
(0)
===========================================================
下星期到广州出差
===========================================================
下星期到广州出差.一个星期.参加AIX 5L SYSTEM ADMINISTRATION课程培训.不错.刚好可以看看一些老同学.
hayyon
发表于:2004.10.26 09:40
::分类:
(
Something
)
::阅读:(719次)
::
评论
(0)
===========================================================
Sap(内存结构和性能优化)学习笔记二
===========================================================
Sap系统的性能可以用以下粗略的方式来衡量.当然具体的性能出现在哪个方面还要具体的来分析我解决.低下的只是针对整个Sap系统而言.大体如下:(各个参数会做另外解释)
Wait time < 10% response time
Main menu > 100ms
工作流量监控中低下的标准也可以做为一具好的性能的衡量指标:
平均的roll-in time < 20ms
平均的roll wait time < 200ms
平均的load time < 10% response time(<50ms)
平均的database request time 40% (response time – wait time)
平均的CPU time < 40%(response time – wait time)
平均的CPU time 不能小于processing time
欢迎大家给予批评和指正.你的指正是对我的进步会有很大的帮助的.
hayyon
发表于:2004.10.22 13:58
::分类:
(
Oracle&Sap&AIX
)
::阅读:(896次)
::
评论
(0)
===========================================================
Sap(内存结构和性能优化)学习笔记一
===========================================================
Sap系统中各个时间概念的解释.Sap系统的性能是由几个不同的时间指标来衡量或者说根据这些时间指标来对Sap系统做相应的调整来提高系统性能.各个时间指标都有相应的请求过程.下面对这几个时间指标进行解释:
Wait time:用户发出transaction process给dispatcher后由dispatcher将这个process放到wait queue中,直到work process可以由这个transaction process获得,这就是wait time.
Roll-in time:当由用户发出的transaction获得work process时,用户的user text data要从roll buffer, extent memory, roll files中roll in到roll memory中.这一段时间就是roll-in time.
Database time:用户的transaction processes请求数据,将由Sap系统的database interface与后台数据库交互,先访问数据库的buffer,如果数据在此buffer中,则Sap database interface直接将数据调出放到Sap buffer中再返回给用户.如果不在database buffer中,则还要通过访问disk将数据先调到database buffer中然后再调到Sap buffer最后返回给用户.由database interface将数据从数据库中调出这一段所处理的时间就是database time.
Load time: Sap处理ABAP code和screen information等的时间
Response time: Transaction process开始到处理完成并将结果返回给用户的这段时间就是response time.
CPU time: Work process在CPU中的进程处理所用的CPU的elapsed time.
Process time: Work process进程调度到释放进程这一段时间.
一个性能指标的参考:K=response time/CPU time,在这,K值不能太大.一般为2
欢迎大家拍砖.
hayyon
发表于:2004.10.22 13:56
::分类:
(
Oracle&Sap&AIX
)
::阅读:(28582次)
::
评论
(0)