Some handy scripts

May 25th, 2008 | Categories: Boring, Events | Tags:

四川5.12地震遇难人数官方统计突破6万人。那些破碎的家庭。祝福你们。



1)察看分区表和分区索引的默认表空间

col owner format a15
col object_name format a35
col object_type format a10
set linesize 150
select owner,object_name,object_type from dba_objects where object_id in (
select obj# from partobj$ where DEFTS# in (
select ts# from v$tablespace where name=’MD_INDEX’) );

2)flou的并行索引必需的PL/SQL

alter index …… rebuild … parallel … ONLINE;

declare
resource_busy exception;
pragma exception_init (resource_busy,-54);
begin
loop
begin
execute immediate ‘alter index …… noparallel’;
exit;
exception
when resource_busy then
dbms_lock.sleep(1);
end;
end loop;
end;
/

3)Unxi下exp的query写法

exp … query=\”where SALE_START \<=sysdate and SALE_START \>= to_date\(\’2008-05-24 20:00:00\’,\’yyyy-mm-dd hh24:mi:ss\’\) \”

很多OS保留符号需要使用”\”转义

Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪 ViVi 365Key 网摘 天极网摘 和讯网摘 博拉网 POCO 网摘 饭否 QQ 书签 Digbuzz 我挖网 Mister Wong
No comments yet.