文章詳情頁
Oracle數據庫配置錯誤信息
瀏覽:4日期:2023-11-20 14:55:43
Oracle數據庫配置錯誤信息Oralce數據庫的錯誤信息經常會出現,我們看見的都是錯誤的代碼,至于錯誤原因究竟是什么還一時半會難以解答,所以就把一些常見的錯誤整理了一下,來看看也許對你有幫助的.;1.Oracle客戶端網絡配置:l; 在Oralce產品安裝完成后,為了與數據庫服務器進行連接或者是兩臺數據庫之間進行數據復制,則必須進行網絡連接配置。l; Oracle9i Net Service配置方法: Oracle9i Net Service的連接配置可以使用數據庫實例ORACLE_SID,或者是使用Oracle9i的參數SERVICE_NAMES。配置Oracle9i客戶端與Oracle9i服務器端的連接,也是生成Oracle9i Net;;;;;Service客戶端網絡配置文件tnsnames.ora,也可以編輯這個文件。 tnsnames.ora文件在Window與Unix下的存儲目錄: Window NT/2000: D:/oracle/ora90/network/admin/tnsnames.ora UNIX:/home/app/oracle/prodUCt/9.0.1/network/admin/tnsnames.ora假如tnsnames.ora文件配置不正確,則錯誤信息會記錄在連接日志信息文件中,其錯誤信息內容為:The error strutct: Nr err code:0 Ns main err code:12560 TNS -12560:TNS: 協議適配器出現錯誤 ns secondary err code:0 nt main err code:530 tns-00530:協議適配器錯誤 nt secondary err code:2 nt OS err code:0在配置Oracle9i的連接配置中,其服務器端需要配置監聽程序進程配置文件listener.ora,假如服務器端監聽進程沒有啟動,則出現以下錯誤信息:ERROR:ORA-12651:TNS:沒有監聽器該信息說明所要連接的服務器沒有啟動監聽進程Listener(該進程為Oracle服務器上操作系統進程,監聽進程沒有啟動時,服務器可以正常進行,但是客戶端不能與服務器產生連接。這時可以在服務器使用操作系統命令lsnrctl正常起啟動監聽進程)具體方法如下:C:>lsnrctl start停止監聽方法:C:>lsnrctl stop修改計算機名后則需要修改監聽進程中的HOST,否則監聽程序會出現以下錯誤: Tns-12545:因目標主機或者對象不存在,連接失敗Tns-12560:tns:協議適配器錯誤Tns-00515: 因目標主機或者對象不存在,連接失敗Error:1001:unknow error在Window NT/2000中,使用服務列表啟動listener.ora服務時也會出現同樣的錯誤信息(對話框)進行意外中止這時,可以修改listener.ora中的下一列信息中HOST處的主機名:(ADDRESS=(PROTOCOL=TCP)(HOST=SUN4500)(PORT=1521))該名稱必須與實際符合,重新啟動監聽程序即可。附:在listener.ora文件中,HOST處答應使用IP地址,這樣修改機器名后就不會引起監聽程序啟動失敗。此外在服務器與listener.ora文件統一目錄中還有一個文件即:tnsnames.ora文件,此文件是用于兩個服務器之間的連接配置,即Oracel分布式環境中的網絡配置該文件的目錄如下:Window NT/2000 D:oracelora90networkadmintnsnames.oraUNIX:; /home/app/oracle/product/9.0.1/network/admin/tnsnames.ora在服務器中,tnsnames.ora默認是使用服務器名進行配置的,所以假如修改了機器名,則該文件同時需要修改,否則出現如下錯誤:Error:ORA:-12545:因目標主機和對象不存在,連接失敗錯誤代碼ORA-12545表示網絡連接串(即tnsnames.ora文件中的HOST處)中使用的機器名和IP地址不存在,重新修改和重新連接即可。Oracle9i Net Service的向導工具進行配置:選擇此選項以創建、修改、刪除或重命名監聽程序。監聽程序是服務器中接收和響應客戶機對數據庫的連接請求的進程。使用配置有相同協議地址的連接描述符的客戶機可以向監聽程序發送連接請求。Oracle9i net Manager:可以定義簡單名稱來表示服務的位置,例如一個數據庫,這些簡單名稱映射為連接描述符。他們包含服務的網絡標識和位置。錯誤信息ORA-12560表示,在操作系統中找不到所定義的實例,在Oracle9i中,假如出現了此類錯誤,一般來說出錯原因有兩個,一是實例名被錯誤的修改,二是Oracle的服務沒有正常啟動。Oracle常見錯誤代碼的分析與解決之二ORA-00600:internal error code,arguments:[num],[?],[?],[?],[?]; 產生原因:這種錯誤通常為ORACLE的內部錯誤,只對OSS和ORACLE開發有用。ORA-600的錯誤經常伴隨跟蹤文件的狀態轉儲(系統狀態和進程狀態),系統狀態存儲將包括ORACLE RDBMS持有的當前對象的信息,進程狀態轉儲則將顯示非凡進程持有的對象,當進程符合了某錯誤條件時,經常是由于一些信息取自它持有的一個塊,假如我們知道這些錯誤進程持有的塊,就輕易跟蹤問題的來源。; 解決方法:一般來說出現這個錯誤我們本身是無法解決的,只有從提高系統本身各方面來解決這個內部問題,如增加硬件設備,調整系統性能,使用OPS(當然OPS從某種意義上說并不是一種好的解決方式)等。ORA-600錯誤的第一個變量用于標記代碼中錯誤的位置(代碼中的每個部分的第一變量都不一樣),從第二個到第五個變量顯示附加信息,告訴OSS代碼在哪里出現了錯誤。; 一個報錯例子如下:; 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(錯誤的重建文件); 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.; 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.;ORA-12560; 協議適配器錯誤:有關ORA-12560: TNS:協議適配器錯誤 的問題①.檢查Terminal Service, 遠程桌面是不是起因 ②.環境變量set oracle_sid=需要的服務名 ③.listener.ora, tnsnames.ora等內機器名或者IP地址是否正確 ④.netstat –a檢查端口是否被占用 ⑤.檢查注冊表HKEY_LOCAL_MACHINESoftwareOracleHome0新增字符串USE_SHARED_SOCKET=TRUE, 重新啟動服務;ERROR:ORA-01031: insufficient privileges權限不足 修改相應權限即可。
排行榜