ORACLE 命令的應用

itpub120發表於2007-06-12
這個部分的命令都在動態收集中......[@more@]

1:加大資料檔案容量

alter database datafile '資料檔案的全路徑' resize 70M;

2:重建索引的

alter index 使用者.index_name rebuild online;

3:用命令重新編譯程式包

alter package 包名 compile body

4:between v1 and v2

相當於>.=v1 並且<=v2

5:

問題症狀:

ORA-1632: max # extents 4096 reached in index PERFSTAT.STATS$PARAMETER_PK
ORA-12012: error on auto execute of job 835
ORA-01632: max # extents (4096) reached in index PERFSTAT.STATS$PARAMETER_PK
ORA-06512: at "PERFSTAT.STATSPACK", line 1390
ORA-06512: at "PERFSTAT.STATSPACK", line 71
ORA-06512: at line 1

問題分析解決:

The max extents error occurs when the current number of extents equals the
maximum number of extents in the max_extents parameter for the object or the
maximum number of extents allowable for the db_block_size , whichever is
smaller, and an attempt is made to add another extent. Max extents can be set
for an object using the MAXEXTENTS option of the storage clause.
These kind of problems can be avoided by pro-actively monitoring the object
sizes that may reach their max_extents one day.

1:以下指令碼發現當前extent 是否達到最大可分配值

SELECT segment_name, owner, EXTENTS, max_extents
FROM dba_segments
WHERE segment_type = 'INDEX' AND
(EXTENTS +1) >= max_extents;

2:增加最大可分配值大小

ALTER INDEX PERFSTAT.STATS$PARAMETER_PK STORAGE ( MAXEXTENTS 8192);

6: ORA-1653: unable to extend table ASO.ASO_ORDER_FEEDBACK_T by 311075 in tablespace ASOD

如此類的:ORA-1653錯誤,經檢查,可能是表的定義上的問題,next extent 太大了,超出了該表所在表空間的空閒大小;

處理方法是將該值修改小;

alter table ASO.ASO_ORDER_FEEDBACK_T storage (next 500m pctincrease 0);

7: userenv('client_info') 用法

begin
fnd_client_info.set_org_context(89);
end;

select userenv('client_info') from dual;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8109090/viewspace-918595/,如需轉載,請註明出處,否則將追究法律責任。

相關文章