文章詳情頁(yè)
Oracle數(shù)據(jù)庫(kù)配置錯(cuò)誤信息
瀏覽:2日期:2023-11-20 14:55:43
Oracle數(shù)據(jù)庫(kù)配置錯(cuò)誤信息Oralce數(shù)據(jù)庫(kù)的錯(cuò)誤信息經(jīng)常會(huì)出現(xiàn),我們看見的都是錯(cuò)誤的代碼,至于錯(cuò)誤原因究竟是什么還一時(shí)半會(huì)難以解答,所以就把一些常見的錯(cuò)誤整理了一下,來看看也許對(duì)你有幫助的.;1.Oracle客戶端網(wǎng)絡(luò)配置:l; 在Oralce產(chǎn)品安裝完成后,為了與數(shù)據(jù)庫(kù)服務(wù)器進(jìn)行連接或者是兩臺(tái)數(shù)據(jù)庫(kù)之間進(jìn)行數(shù)據(jù)復(fù)制,則必須進(jìn)行網(wǎng)絡(luò)連接配置。l; Oracle9i Net Service配置方法: Oracle9i Net Service的連接配置可以使用數(shù)據(jù)庫(kù)實(shí)例ORACLE_SID,或者是使用Oracle9i的參數(shù)SERVICE_NAMES。配置Oracle9i客戶端與Oracle9i服務(wù)器端的連接,也是生成Oracle9i Net;;;;;Service客戶端網(wǎng)絡(luò)配置文件tnsnames.ora,也可以編輯這個(gè)文件。 tnsnames.ora文件在Window與Unix下的存儲(chǔ)目錄: Window NT/2000: D:/oracle/ora90/network/admin/tnsnames.ora UNIX:/home/app/oracle/prodUCt/9.0.1/network/admin/tnsnames.ora假如tnsnames.ora文件配置不正確,則錯(cuò)誤信息會(huì)記錄在連接日志信息文件中,其錯(cuò)誤信息內(nèi)容為:The error strutct: Nr err code:0 Ns main err code:12560 TNS -12560:TNS: 協(xié)議適配器出現(xiàn)錯(cuò)誤 ns secondary err code:0 nt main err code:530 tns-00530:協(xié)議適配器錯(cuò)誤 nt secondary err code:2 nt OS err code:0在配置Oracle9i的連接配置中,其服務(wù)器端需要配置監(jiān)聽程序進(jìn)程配置文件listener.ora,假如服務(wù)器端監(jiān)聽進(jìn)程沒有啟動(dòng),則出現(xiàn)以下錯(cuò)誤信息:ERROR:ORA-12651:TNS:沒有監(jiān)聽器該信息說明所要連接的服務(wù)器沒有啟動(dòng)監(jiān)聽進(jìn)程Listener(該進(jìn)程為Oracle服務(wù)器上操作系統(tǒng)進(jìn)程,監(jiān)聽進(jìn)程沒有啟動(dòng)時(shí),服務(wù)器可以正常進(jìn)行,但是客戶端不能與服務(wù)器產(chǎn)生連接。這時(shí)可以在服務(wù)器使用操作系統(tǒng)命令lsnrctl正常起啟動(dòng)監(jiān)聽進(jìn)程)具體方法如下:C:>lsnrctl start停止監(jiān)聽方法:C:>lsnrctl stop修改計(jì)算機(jī)名后則需要修改監(jiān)聽進(jìn)程中的HOST,否則監(jiān)聽程序會(huì)出現(xiàn)以下錯(cuò)誤: Tns-12545:因目標(biāo)主機(jī)或者對(duì)象不存在,連接失敗Tns-12560:tns:協(xié)議適配器錯(cuò)誤Tns-00515: 因目標(biāo)主機(jī)或者對(duì)象不存在,連接失敗Error:1001:unknow error在Window NT/2000中,使用服務(wù)列表啟動(dòng)listener.ora服務(wù)時(shí)也會(huì)出現(xiàn)同樣的錯(cuò)誤信息(對(duì)話框)進(jìn)行意外中止這時(shí),可以修改listener.ora中的下一列信息中HOST處的主機(jī)名:(ADDRESS=(PROTOCOL=TCP)(HOST=SUN4500)(PORT=1521))該名稱必須與實(shí)際符合,重新啟動(dòng)監(jiān)聽程序即可。附:在listener.ora文件中,HOST處答應(yīng)使用IP地址,這樣修改機(jī)器名后就不會(huì)引起監(jiān)聽程序啟動(dòng)失敗。此外在服務(wù)器與listener.ora文件統(tǒng)一目錄中還有一個(gè)文件即:tnsnames.ora文件,此文件是用于兩個(gè)服務(wù)器之間的連接配置,即Oracel分布式環(huán)境中的網(wǎng)絡(luò)配置該文件的目錄如下:Window NT/2000 D:oracelora90networkadmintnsnames.oraUNIX:; /home/app/oracle/product/9.0.1/network/admin/tnsnames.ora在服務(wù)器中,tnsnames.ora默認(rèn)是使用服務(wù)器名進(jìn)行配置的,所以假如修改了機(jī)器名,則該文件同時(shí)需要修改,否則出現(xiàn)如下錯(cuò)誤:Error:ORA:-12545:因目標(biāo)主機(jī)和對(duì)象不存在,連接失敗錯(cuò)誤代碼ORA-12545表示網(wǎng)絡(luò)連接串(即tnsnames.ora文件中的HOST處)中使用的機(jī)器名和IP地址不存在,重新修改和重新連接即可。Oracle9i Net Service的向?qū)Чぞ哌M(jìn)行配置:選擇此選項(xiàng)以創(chuàng)建、修改、刪除或重命名監(jiān)聽程序。監(jiān)聽程序是服務(wù)器中接收和響應(yīng)客戶機(jī)對(duì)數(shù)據(jù)庫(kù)的連接請(qǐng)求的進(jìn)程。使用配置有相同協(xié)議地址的連接描述符的客戶機(jī)可以向監(jiān)聽程序發(fā)送連接請(qǐng)求。Oracle9i net Manager:可以定義簡(jiǎn)單名稱來表示服務(wù)的位置,例如一個(gè)數(shù)據(jù)庫(kù),這些簡(jiǎn)單名稱映射為連接描述符。他們包含服務(wù)的網(wǎng)絡(luò)標(biāo)識(shí)和位置。錯(cuò)誤信息ORA-12560表示,在操作系統(tǒng)中找不到所定義的實(shí)例,在Oracle9i中,假如出現(xiàn)了此類錯(cuò)誤,一般來說出錯(cuò)原因有兩個(gè),一是實(shí)例名被錯(cuò)誤的修改,二是Oracle的服務(wù)沒有正常啟動(dòng)。Oracle常見錯(cuò)誤代碼的分析與解決之二ORA-00600:internal error code,arguments:[num],[?],[?],[?],[?]; 產(chǎn)生原因:這種錯(cuò)誤通常為ORACLE的內(nèi)部錯(cuò)誤,只對(duì)OSS和ORACLE開發(fā)有用。ORA-600的錯(cuò)誤經(jīng)常伴隨跟蹤文件的狀態(tài)轉(zhuǎn)儲(chǔ)(系統(tǒng)狀態(tài)和進(jìn)程狀態(tài)),系統(tǒng)狀態(tài)存儲(chǔ)將包括ORACLE RDBMS持有的當(dāng)前對(duì)象的信息,進(jìn)程狀態(tài)轉(zhuǎn)儲(chǔ)則將顯示非凡進(jìn)程持有的對(duì)象,當(dāng)進(jìn)程符合了某錯(cuò)誤條件時(shí),經(jīng)常是由于一些信息取自它持有的一個(gè)塊,假如我們知道這些錯(cuò)誤進(jìn)程持有的塊,就輕易跟蹤問題的來源。; 解決方法:一般來說出現(xiàn)這個(gè)錯(cuò)誤我們本身是無法解決的,只有從提高系統(tǒng)本身各方面來解決這個(gè)內(nèi)部問題,如增加硬件設(shè)備,調(diào)整系統(tǒng)性能,使用OPS(當(dāng)然OPS從某種意義上說并不是一種好的解決方式)等。ORA-600錯(cuò)誤的第一個(gè)變量用于標(biāo)記代碼中錯(cuò)誤的位置(代碼中的每個(gè)部分的第一變量都不一樣),從第二個(gè)到第五個(gè)變量顯示附加信息,告訴OSS代碼在哪里出現(xiàn)了錯(cuò)誤。; 一個(gè)報(bào)錯(cuò)例子如下:; ORA-00600: internal error code, arguments: [1237], [], [], [], [], [], [], []; 相應(yīng)的英文如下:; 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(超時(shí)); File corruption(文件太老); Failed data checks in memory(內(nèi)存檢索失敗); Hardware,memory,or I/O errors(硬件、內(nèi)存或者磁盤錯(cuò)誤); Incorrectly restored files(錯(cuò)誤的重建文件); ORA-03113:end-of-file on communication channel; 產(chǎn)生原因:通訊不正常結(jié)束,從而導(dǎo)致通訊通道終止; 解決方法:1>.檢查是否有服進(jìn)程不正常死機(jī),可從alert.log得知; 2>.檢查sql*Net Driver是否連接到ORACLE可執(zhí)行程序; 3>.檢查服務(wù)器網(wǎng)絡(luò)是否正常,如網(wǎng)絡(luò)不通或不穩(wěn)定等; 4>.檢查同一個(gè)網(wǎng)上是否有兩個(gè)同樣名字的節(jié)點(diǎn); 5>.檢查同一個(gè)網(wǎng)上是否有重復(fù)的IP地址; 相應(yīng)的英文如下:; 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; 產(chǎn)生原因:這是由于裝載的表或視圖不存在,多半是CATEXP.SQL還沒有運(yùn)行,無法執(zhí)行Export視圖,假如CATEXP.SQL已經(jīng)運(yùn)行,則可能是版本錯(cuò)誤。; 解決方法:因?yàn)镮mport和Export共享的一些視圖是通過運(yùn)行CATEXP.SQL來裝載的(它們具有相同的視圖),并不生成單獨(dú)的CATEXP.SQL,因而造成視圖與Export代碼不同步,較難保持彼此之間的兼容,用戶就必須建立自己的Export應(yīng)用,從而避免ORA-00942的錯(cuò)誤。; 相應(yīng)的英文如下: 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; 協(xié)議適配器錯(cuò)誤:有關(guān)ORA-12560: TNS:協(xié)議適配器錯(cuò)誤 的問題①.檢查Terminal Service, 遠(yuǎn)程桌面是不是起因 ②.環(huán)境變量set oracle_sid=需要的服務(wù)名 ③.listener.ora, tnsnames.ora等內(nèi)機(jī)器名或者IP地址是否正確 ④.netstat –a檢查端口是否被占用 ⑤.檢查注冊(cè)表HKEY_LOCAL_MACHINESoftwareOracleHome0新增字符串USE_SHARED_SOCKET=TRUE, 重新啟動(dòng)服務(wù);ERROR:ORA-01031: insufficient privileges權(quán)限不足 修改相應(yīng)權(quán)限即可。
標(biāo)簽:
Oracle
數(shù)據(jù)庫(kù)
排行榜
