Archive for 十一月 20th, 2007

AIX学习

星期二, 十一月 20th, 2007

AIX是自己一直想学习的系统,可是由于没有练习环境一直无法实施,最近有AIX练习机了,所以开始AIX学习了.希望自己能有所收获.

遇到一个,记一个.

星期二, 十一月 20th, 2007

1.修改xdb端口

SQL> call  dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get() ,  ‘/xdbconfig/sysco
  nfig/protocolconfig/httpconfig/http-port/text()’,  8081))

查询表空间使用和未使用的空间

SELECT b.tablespace_name, mbytes_alloc, mbytes_free
  FROM (SELECT   ROUND (SUM (BYTES) / 1024 / 1024) mbytes_free,
                 tablespace_name
            FROM dba_free_space
        GROUP BY tablespace_name) a,
       (SELECT   ROUND (SUM (BYTES) / 1024 / 1024) mbytes_alloc,
                 tablespace_name
            FROM dba_data_files
        GROUP BY tablespace_name) b
 WHERE a.tablespace_name(+) = b.tablespace_name
       AND b.tablespace_name IN (’USERS’, ‘SYSTEM’)

3当移动一个表的多个分区时的脚本

BEGIN
   FOR x IN (SELECT partition_name
               FROM user_tab_partitions
              WHERE table_name = ‘BIG_TABLE2′)
   LOOP
      EXECUTE IMMEDIATE    ‘alter table big_table2 move partition ‘
                        || x.partition_name;
   END LOOP;
END;
/

oracle分区表优点

星期二, 十一月 20th, 2007

oracle分区表

分区有利于管理更大的表和索引,在分区中引入了一个分区键的概念,分区键用于根据某个区间值、特定值列表、或散列函数执行数据的聚集。

使用分区表可能有如下好处:

(全文…)

10G 动态性能视图(FLASH)

星期二, 十一月 20th, 2007

oracle_10g.swf

基于事务和会话的临时表

星期二, 十一月 20th, 2007

[oracle@devel1 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 20 14:30:08 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn scott/tiger
Connected.
SQL> create global temporary table temp_table_session
  2  on commit preserve rows
  3  as
  4  select * from scott.emp where 1=0
  5  /

Table created.

(全文…)