Oracle EBS開發錯誤集錦

好像是在學習Oracle的時候在碰到的一些問題的解決方案收集,分享給大家,希望能對大家有用


1.ORA-00054: 資源正忙, 但指定以 NOWAIT 方式獲取資源

Reason1:web服務器佔用了表,關掉web就行了。謝謝各位。

Reason2:他人在用同一個表空間或在同一時間共同操作


2.FRM-40505: orACLE 無法查詢

ToolTips:把菜單換爲默認菜單。運行出現“FRM-40505 orACLE無法查詢”時,選擇Help->Display Error。你將看到出錯的查詢語句,和具體的Oracle錯誤號

這個錯誤經常出現在一些數據庫項沒有對應column的情況下

Solution:
1、block中有若干個item,而這些item的“DataBase Item”屬性爲Yes,但“Column Item”屬性的值卻爲空,所以不能查詢。
解決辦法是:給這些item的“Column Name”屬性指定Table/view中的Column
2、block中有非數據庫字段,而這些item的“DataBase Item”屬性爲Yes。 
解決方法:設置這些item的“DataBase Item”屬性爲No。 


3.FRM-41839:在臨時記錄緩衝區文件/tmp/ztYpaa.tmp中磁盤的輸入/輸入錯誤

原因:是/TMP目錄的空間用完了



解決辦法:(從metalink上找的)

fact: oracle Application Object Library
symptom: FRM-41839: Disk I/O error on temporary record buffer file 
/var/tmp/AAAJGaa9Z.TMP
symptom: Querying Values in a value set/Rows in row sets
change: NOTE ROLE: Also note that per Note 157385.1, this error occurs when 
a query is performed which returns a large number of records. Forms is trying 
to create a temporary file in which to place the results of the query. There 
is not enough disk space on the drive which is assigned to TEMP/TMP. Either 
free up more space or move the TEMP directory to a different drive.
cause: The /var/tmp referenced in the error message was on Web/Forms 
tier.


fix:

There are 3 possible solutions:
1. Create a soft link to a mount point with more disk space
2. Add more disk space.
3. Set the TMPDIR environment variable and manually start the forms server. See 
How to Change the Directory for the Forms Server Temporary File


4.FRM-10095: Assertion failed in iewbdbc_oracle_to_id

Cause:  An internal inconsistency was detected. Action:  Contact an oracle support representative, and proceed with caution.



Try to remove the timestamp datatype from the tables or make the block manually without using the wizard


數據表字段中含用timestamp類型的值,將timestamp類型改爲date的值就OK了



5.PACKAGE BODY DEZAI.UBS_USER_ACTION 編譯錯誤

錯誤:PLS-00428: 在此 Select 語句中缺少 INTO 子句
行:7
文本:select * from UBS_USer where USERID=DuserID;

Solution:在PL/SQL中,你應將Select 出來的結果放進一些變量或遊標,你應將那個Select 放進一個遊標,再利用遊標循環顯示出結果

在pl/sql中,selelct 的結果一定要用into 放在自定義的變量中


6.ORA-00942:表或視圖不存在

select *
from all_objects
where object_type in ('TABLE','VIEW')
and object_name = 'mytest;
有這個表,而且owner也是我登陸的用戶,怎麼回事呀

select * from "mytest“

solution:估計是沒有權限,用管理員帳號對此用戶分配權限


7.ORA-01219: 數據庫未打開: 僅允許在固定表/視圖中查詢

orA-01033:ORACLE   initialization   or   shutdown   in   progress
solution:

(1)運行語句:
Alter DATABASE OPEN 
再運行語句
startup  mount; 

在PL\SQL的SQL窗口中運行
sql>select group#,sequence#,archived,status from v$log;

得到結果
1    1    35    NO    INACTIVE
2    3    34    NO    INACTIVE
3    2    36    NO    CURRENT

sql>alter database clear logfile group 1;

sql>alter database clear logfile group 3;


在運行裏執行:conn   internal/oracle   as   sysdba進行SQL模式   
  sql>shutdown   immediate   
  sql>startup   mount   
  sql>alter   database   open;   

    把以上這些步驟執行一下,看在哪裏報錯了,這就是手工啓動數據庫。  
    


8.動態執行表不可訪問,本會話的自動統計被禁止"錯誤解決 

    
grant select on v_$statname to thirdangle; 
grant select on v_$sesstat to thirdangle; 
grant select on v_$session to thirdangle; 
grant select on v_$mystat to thirdangle; 

thirdangle就是要被授權的用戶名 


9.FRM-40505: orACLE error: unable to perform query.

1、block中有若干個item,而這些item的“DataBase Item”屬性爲Yes,但“Column Item”屬性的值卻爲空,所以不能查詢。
解決辦法是:給這些item的“Column Name”屬性指定Table/view中的Column
2、block中有非數據庫字段,而這些item的“DataBase Item”屬性爲Yes。 
解決方法:設置這些item的“DataBase Item”屬性爲No。 

10:ORA-00917:缺少逗號

insert into 語句中列的名字中不允許有空格;要是有空格,就會出現缺少逗號的錯誤

orA-01650: unable to extend rollback segment NAME by NUM intablespace NAME 

產生原因:上述ORACLE錯誤爲回滾段表空間不足引起的,這也是ORACLE數據管理員最常見的ORACLE錯誤信息。當用戶在做一個非常龐大的數據操作導致現有回滾段的不足,使可分配用的回滾段表空間已滿,無法再進行分配,就會出現上述的錯誤。 

解決方法:使用“Alter TABLESPACE tablespace_name ADD DATAFILE filename SIZE size_of_file”命令向指定的數據增加表空間,根據具體情況可以增加一個或多個表空間。當然這與還與你主機上的裸盤設備有關,如果你主機的裸盤設備已經沒有多餘的使用空間,建議你不要輕意增加回滾段表空間的大小,可使用下列語句先查詢一下剩餘的tablespace空間有多少: 

select user_name,sql_text from V$open_cursor where user_name=''; 

如果多餘的空間比較多,就可以適當追加一個大的回滾段給表空間使用,從而避免上述的錯誤。你也可以用以下語句來檢測一下rollback segment的競爭狀況: 

Select class, count 

from V$waitstat 

where calss in('system undo header', 'system undo block', 'undo header', 'undo block'); 


和 

select sum(value) 

from V$sysstat 

where name in ('db_block_gets', 'consistents gets'); 


如果任何一個class in count/sum(value)大於1%,就應該考慮增加rollback segment。 

相應的英文如下: 

Cause: Failed to allocate extent from the rollback segment in tablespace. 

Action: Use the Alter TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace. 

11.ORA-01652: unable to extend temp segment by num in tablespace name. 

產生原因:Oracle臨時段表空間不足,因爲Oracle總是儘量分配連續空間,一但沒有足夠的可分配空間或者分配不連續就會出現上述的現象。 

解決方法:我們知道由於Oracle將表空間作爲邏輯結構——單元,而表空間的物理結構是數據文件,數據文件在磁盤上物理地創建,表空間的所有對象也存在於磁盤上,爲了給表空間增加空間,就必須增加數據文件。先查看一下指定表空間的可用空間,使用視圖SYS.DBA_FREE_SPACE,視圖中每條記錄代表可用空間的碎片大小: 

SQL>select file_id, block_id, blocks, bytes 

    from sys.dba_free_space 

    where tablespace_name=''; 


返回的信息可初步確定可用空間的最大塊,看一下它是否小於錯誤信息中提到的尺寸,再查看一下缺省的表空間參數: 

SQL>Select INITIAL_EXTENT, NEXT_EXTENT, MIN_EXTENTS, PCT_INCREASE 

    FROM SYS.DBA_TABLESPACES 

    Where TABLESPACE_NAME=name; 


通過下面的SQL命令修改臨時段表空間的缺省存儲值: 

SQL>Alter TABLESPACE name DEFAULT STORAGE (INITIAL XXX NEXT YYY); 

適當增大缺省值的大小有可能解決出現的錯誤問題,也可以通過修改用戶的臨時表空間大小來解決這個問題: 

SQL>Alter USER username TEMPORARY TABLESPACE new_tablespace_name; 

使用Alter TABLESPACE命令,一但完成,所增加的空間就可使用,無需退出數據庫或使表空間脫機,但要注意,一旦添加了數據文件,就不能再刪除它,若要刪除,就要刪除表空間。 

12.ORA-1652:unable to extend temp segment by 207381 in tablespace TEMPSPACE 

相應的英文如下: 

Cause: Failed to allocate extent for temp segment in tablespace 

Action: Use the Alter TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace or create the object in another tablespace. 

13.ORA-01578: oracle data block corrupted(file # num, block # num) 

產生原因:當Oracle訪問一個數據塊時,由於 

1. 硬件的I/O錯誤; 

2. 操作系統的I/O錯誤或緩衝問題; 

3. 內存或paging問題; 

4. oracle試圖訪問一個未被格式化的系統塊失敗; 

5. 數據文件部分溢出等上述幾種情況的一種引起了邏輯壞塊或者物理壞塊,這時就會報ORA-01578的錯誤。 

解決方法:由於Oracle只有在訪問到有問題的數據文件時纔會報錯,所以報錯的時間有可能會比實際出錯的時間要晚,如果ORA-01578出錯信息提示數據壞塊指向的是用戶自己的數據文件,則用以下方法來解決: 

如果通過下面的SQL語句查出的壞塊出現有索引上,則只需重建索引即可。 

SQL>select owner, segment_name, segment_type 

    from dba_extents 

    where file_id= and between block_id and block_id+blocks-1; 


如果壞塊出現在表上,先用以下語句分析是否爲永久性壞塊(建議多執行一兩次,有助於鑑別數據壞塊是永久性的(硬盤上的物理壞塊)還是隨機性的(內存或硬件錯誤引起)): 

SQL>Analyze table validate structure cascade; 

執行該命令後,可能會出現以下的結果: 

14.ORA-01578:與原先錯誤信息有相同的參數,爲永久性的物理或邏輯壞塊;與原先錯誤信息有不同的參數,可能與內存,page space和I/O設備有關。 

如果用戶有此表的最新備份,那麼最好是用此備份來恢復此表,或者使用event 10231來取出壞塊以外的數據: 

1. 先關閉數據庫 

2. 編輯init.ora文件,加入:event="10231 trace name context forever, level 10" 

3. startup restrict 

4. 創建一個臨時表:SQL>create table errortemp as select * from error;(error是壞表的表名) 

5. 把event從init.ora文件中刪掉並重起數據庫 

6. rename壞表,把臨時表rename成壞表的表名 

7. 創建表上的INDEX等 

如果ORA-01578出錯信息提示數據壞塊指向的是數據字典或者是回滾段的話,你應該立即與ORACLE公司聯繫,共同商量一個好的解決辦法。 

這裏所講的解決方法只是比較常見的一種,一些更爲具體的解決辦法可以查看一下ORACLE的故障解決手冊,那裏面有浞及使用ROWID方法來取出壞塊以外的數據的方法,這裏就不介紹了。 

相應的英文如下: 

Cause: The given data block was corrupted,probably due to program errors 

Action: Try to restore the segment containing the given data block,This may involve dropping the segment and recreating it,If there is a trace file,report the messages recorded in it to customer support. 

15.ORA-01628: max # of extents num reached for rollback segment num 

產生原因:這種錯誤通常爲一個回滾段和一個表空間已經達到MAXEXTENTS參數設置的極限。要注意的是這個MAXEXTENTS不是該回滾段或表空間的硬件極限,硬件極限取決於數據庫創建時在init.ora文件中指定的DB_BLOCK_SIZE參數的值。 

解決方法:使用SQL命令Alter TABLESPACE…STORAGE(MAXEXTENTS XXXX)來增加MAXEXTENTS,其中“XXXX”值必須大於錯誤信息中所指的數值,但不能大於LARGEST MAXEXTENT的值,如果已經達到了LARGEST MAXEXTENT VALUE,解決的辦法就是重新創建較大的範圍尺寸,使用帶有選項COMPRESS=Y的Export工具導出表,如果表空間有可用空間,先給表做一個備份,用alter tablespace tablespace_name更改其名字,然後再裝載表回數據庫。 

查看其錯誤出現的地方,如果出現在回滾段或索引上,那麼必須將其刪除並重建,如果出現在臨時表空間,修改臨時表空間的存儲字段,便可解決這個問題。 



16.ORA-1628: max # extents 50 reached for rollback segment RBS_1 

相應的英文如下: 

Cause: An attempt was made to extend a rollback segment that already has reached its maximum size or space could not be allocated in the data dictionary to contain the definition of the object. 

Action: If possible, increase the value of either the MAXEXTENTS or PCTINCREASE initialization parameters or find the data dictionary table lacking space and alter the storage parameters, as described in the oracle8 Server Administrator’s Guide. 

17.ORA-00600: internal error code,arguments: [num], [?], [?], [?], [?] 

產生原因:這種錯誤通常爲Oracle的內部錯誤,只對OSS和Oracle開發有用。ORA-600的錯誤經常伴隨跟蹤文件的狀態轉儲(系統狀態和進程狀態),系統狀態存儲將包括ORACLE RDBMS持有的當前對象的信息,進程狀態轉儲則將顯示特殊進程持有的對象,當進程符合了某錯誤條件時,經常是由於一些信息取自它持有的一個塊,如果我們知道這些錯誤進程持有的塊,就容易跟蹤問題的來源。 

解決方法:一般來說出現這個錯誤我們本身是無法解決的,只有從提高系統本身各方面來解決這個內部問題,如增加硬件設備、調整系統性能、使用OPS(當然OPS從某種意義上說並不是一種好的解決方式)等。ORA-600錯誤的第一個變量用於標記代碼中錯誤的位置(代碼中的每個部分的第一變量都不一樣),從第二個到第五個變量顯示附加信息,告訴OSS代碼在哪裏出現了錯誤。 



18.ORA-00600: internal error code, arguments: [1237], [], [], [], [], [], [], [] 

相應的英文如下: 

Cause: This is a catchall internal error message for oracle program exceptions.It indicates that a process has met a low-level,unexpected condition.Various causes of this message include: 

Time-outs(超時) 

File corruption(文件太老) 

Failed data checks in memory(內存檢索失敗) 

Hardware, memory, or I/O errors(硬件、內存或者磁盤錯誤) 

Incorrectly restored files(錯誤的重建文件) 


19.ORA-03113:end-of-file on communication channel 

產生原因:通訊不正常結束,從而導致通訊通道終止。 

解決方法: 

1. 檢查是否有服進程不正常死機,可從alert.log得知 

2. 檢查sql*Net Driver是否連接到ORACLE可執行程序 

3. 檢查服務器網絡是否正常,如網絡不通或不穩定等 

4. 檢查同一個網上是否有兩個同樣名字的節點 

5. 檢查同一個網上是否有重複的IP地址 

相應的英文如下: 

Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8,two task,software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle,that is,the network or server machine went down. 

Action: If this message occurs during a commection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an oracle internal error that requires the assistance of customer support. 

20.ORA-00942: table or view does not exist 

產生原因:這是由於裝載的表或視圖不存在,多半是CATEXP.SQL還沒有運行,無法執行Export視圖,如果CATEXP.SQL已經運行,則可能是版本錯誤。 

解決方法:因爲Import和Export共享的一些視圖是通過運行CATEXP.SQL來裝載的(它們具有相同的視圖),並不生成單獨的CATEXP.SQL,因而造成視圖與Export代碼不同步,較難保持彼此之間的兼容,用戶就必須建立自己的Export應用,從而避免ORA-00942的錯誤。 

相應的英文如下: 

Cause: The table or view entered does not exist, a synonym that is jnot allowed here was used, or a view was referenced where a table is required.Existing user tables and views can be listed by querying the data dictionary. Certain privileges may required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it. 

Action: Check each of the following: 

The spelling of the table or view name. 

That a view is not specified where a table is required. 

That an existing table or view name exists. 

Contact the database administrator if the table needs to be created or if user or application priviledes are required to access the table. 

Also, if attempting to access a table or view in another schema, make certain thecorrect schema is referenced and that access to the object is granted. 

21.ORA-01598:rollback segment "name" is not online 

Cause: The rollback segment was taken offline either manually or by SMON. 

Action: Check the status of the rollback segment in DBA_ROLLBACK_SEGS. 

22.ORA-1636: rollback segment "name" is already online 

Cause: A rollback segment can only be used by one instance and an instance is trying to bring a rollback segment online that is already in use. 

Action: Check that the values set in the initialization parameter file for parameters 

ROLLBACK_SEGMENTS, ROLLBACK_SEGMENT_INITIAL, and ROLLBACK_SEGMENT_COUNT are correctly set for the instance whiththe problem. Also check that the instance is using the correct initialization parameter file. Make sure you are not confused about the difference between private and public rollback segments. See the oracle8 Server Administrator’s Guide for more information about using rollback segments in paraller mode. 

上述錯誤均爲我們在使用回滾段時比較常見的問題,ORA-01598指明當前使用的回滾段的狀態爲“not online”,不能使用,將它改爲“online”狀態即可使用;ORA-01636指明當前回滾段已經爲“online”狀態,可以直接使用,不用再集合它。 

23.ORA-1636 signalled during: alter rollback segment rb00 online 

我們在做統計時還可能遇到下述問題:一個rollback segment的狀態爲”Needs Recovery”的現象,這是由於ORACLE回退一個事物表中的沒有提交的事物時失敗所造成的。通常原因爲一個datafile或者tablespace是在offline的狀態或者一個undo的目標被破壞或者rollback segment被破壞。解決的辦法是將所有的tablespace和datafile都置爲online狀態,如果不能解決則做下面的工作: 

1. 在initsid.ora中加入event="10015 trace name context forever lever 10"; 

2. shutdown數據庫然後重啓; 

3. 在$ORACLE_HOME/rdbms/log下,找到startup時生成的trace file; 

4. 在trace文件中,找到下列信息"error recovery tx(#,#) object #"; 

5. 根據object#(與sys.dba_objects表中的object_id相同)在sys.dba_objects表中查出該object的名字; 

6. 將該object drop掉; 

7. 在init.ora文件中將該rollback segment放回rollback_segments參數中,刪除event; 

8. shutdown數據庫然後重啓。此時"Needs Recovery"的問題應該是完全解決了,否則就是rollback segment被破壞了。 

24.ORA-01688:unable to extend table name.name partition NAME by NUM in tablespace NAME 

產生原因:指定的tablespace空間已經被佔用滿,無法擴展。 

解決方法:使用“Alter TABLESPACE ADD DATAFILE”命令增加文件系統文件和原始分區,或者增加INITIAL的大小(如:alter tablespace CDRS101 default storage(next 500M pctincrease 1))應該能夠解決,否則就是有人使用你的表空間上創建了一個比較大的數據文件導致你的表空間不夠用。 



24.ORA-1688: unable to extend table RMMCDR.LOCAL_CDR partition LOCAL_CDR101 by 460800 in tablespace CDRS101 

相應的英文如下: 

Cause: An extent could not be allocated for a table segment in tablespace 

Action: Use the Alter TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace 



25.錯誤提示:FRM-41839:在臨時記錄緩衝區文件/tmp/ztYpaa.tmp中磁盤的輸入/輸入錯誤

原因:是/TMP目錄的空間用完了



解決辦法:(從metalink上找的)

•fact: oracle Application Object Library
•symptom: FRM-41839: Disk I/O error on temporary record buffer file 
/var/tmp/AAAJGaa9Z.TMP
•symptom: Querying Values in a value set/Rows in row sets
•change: NOTE ROLE: Also note that per Note 157385.1, this error occurs when 
a query is performed which returns a large number of records. Forms is trying 
to create a temporary file in which to place the results of the query. There 
is not enough disk space on the drive which is assigned to TEMP/TMP. Either 
free up more space or move the TEMP directory to a different drive.
•cause: The /var/tmp referenced in the error message was on Web/Forms 
tier.


fix:

There are 3 possible solutions:
1. Create a soft link to a mount point with more disk space
2. Add more disk space.
3. Set the TMPDIR environment variable and manually start the forms server. See 


有些解決方案一下子記不得出處了,感謝提供解決方案的作者,謝謝。



PL/SQL顯示行號:
tools> preferens >userinterface >editor >other   

Check display line numbers



orA-00972: identifier is too long.
*Cause:  An identifier with more than 30 characters was specified.
*Action:  Specify at most 30 characters.

應該是表空間名超過了30個字符。命名過長


PLS-00428: an INTO clause is expected in this Select statement 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章