Oracle數(shù)據(jù)庫(kù)安裝錯(cuò)誤集錦:
◆1.如果你不能運(yùn)行./runInstaller ,提示x11 錯(cuò)誤,請(qǐng)使用root 輸入如下命令#xhost +
◆2.如果當(dāng)你輸入dbca命令之后在最后一步會(huì)莫名其妙的發(fā)生界面消失,并在命令行出現(xiàn)如下錯(cuò)誤消息:
/oracle/product/9.2.0.1/bin/dbca: line 124: 27348 Killed $JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m
-classpath $CLASSPATH
oracle.sysman.assistants.dbca.Dbca $ARGUMENTS時(shí),要解決這個(gè)問題,只需要執(zhí)行下面命令修改dbca腳本:
vi $ORACLE_HOME/bin/dbca
從第118行開始,將第118、119、121、122、123、124共6行都用"#"符號(hào)注釋掉,結(jié)果如下:
#if [ -f /etc/rac_on ]; then
#Run DBCA
$JRE_DIR/bin/jre –native –DORACLE_HOME=$OH……
#else
#Run DBCA
#$JRE_DIR/bin/jre –DORACLE_HOME=$OH……
#fi
修改完成之后再運(yùn)行dbca重建數(shù)據(jù)庫(kù)。如果這一步?jīng)]有做處理,將會(huì)導(dǎo)致創(chuàng)建的數(shù)據(jù)庫(kù)沒有init配置文件,無(wú)法啟動(dòng).
◆3.ORA-00988:missing or invalid password(s)
問題:
遇到 ORA-00988 missing or invalid password (口令缺失或無(wú)效) 錯(cuò)誤,怎么辦?
解答:
在設(shè)置數(shù)據(jù)庫(kù)實(shí)例的密碼時(shí),注意不要以數(shù)字開頭,否則您將會(huì)遇到 ORA-00988 missing or invalid password (口令缺失或無(wú)效) 錯(cuò)誤。
Oracle 10g 安裝完成后,您可使用 dbca 命令創(chuàng)建新的數(shù)據(jù)庫(kù)實(shí)例,或維護(hù)已有的數(shù)據(jù)庫(kù)實(shí)例。
如果您安裝的是 Oracle XE 數(shù)據(jù)庫(kù),則必須反安裝 Oracle XE 后重新安裝 Oracle XE,并在安裝過程中指定非數(shù)字開頭的密碼 (例如
password 或 pswd123)。
◆4.建庫(kù)時(shí)候遇到的問題
ORA-29807: specified operator does not exist
這是Oracle 的bug , 可以忽略掉,安裝完成后,在$ORACLE_HOME/rdbms/admin 目錄下運(yùn)
行utlrp.sql ,用于修補(bǔ)ORA-29807 錯(cuò)誤。
解釋:
ORA-29807: specified operator does not exist
This is a known issue (bug 2925665). You can click on the "Ignore" button to continue.
Once DBCA has completed database creation, remember to run the 'prvtxml.plb' script
from $ORACLE_HOME/rdbms/admin independently, as the user SYS. It is also advised
to run the 'utlrp.sql' script to ensure that there are no invalid objects in the database at this time.
很多人進(jìn)了sqlplus不會(huì)跑sql,其實(shí)很簡(jiǎn)單。
比如我這里吧,登錄之后,@/home/oracle/a.sql;
就行了。
◆5.執(zhí)行sqlplus出現(xiàn)的問題
error while loading shared libraries: libclntsh.so.9.0: cannot open shared object file: No such file or directory
libclntsh.so.9.0這個(gè)庫(kù)是oracle 9i:OCI客戶端運(yùn)行時(shí)庫(kù),如果程序使用了oci讀寫數(shù)據(jù)庫(kù)必定會(huì)裝載這個(gè)庫(kù),它一般在/
安裝路徑>/product/9.x.x/lib,除非你沒有安裝oracle客戶端的話(在安裝時(shí)),就會(huì)出現(xiàn)找不到這個(gè)庫(kù)這個(gè)問題。
如果安裝了,那么程序運(yùn)行時(shí)還是要在/etc/ld.so.conf所列路徑下、和LD_LIBRARY_PATH所列路徑下 去尋找這個(gè)庫(kù),如果這兩個(gè)地方都找不到就會(huì)報(bào)錯(cuò),說找不到這個(gè)庫(kù)。我估計(jì)你的/etc/ld.so.conf下肯定沒有包含//product/9.x.x/lib這個(gè)路徑,但你的用戶shell啟動(dòng)腳本(.bash_profile)設(shè)置了。
LD_LIBRARY_PATH=//product/9.x.x/lib:...這個(gè)環(huán)境變量,所以你用用戶賬號(hào)運(yùn)行程序是沒問題的。但crontab有自
己的用戶賬號(hào),crontab運(yùn)行時(shí)并不會(huì)設(shè)置LD_LIBRARY_PATH=//product/9.x.x/lib: 。所以就找不到庫(kù)了。
解決辦法:
將//product/9.x.x/lib路徑加入/etc/ld.so.conf,并運(yùn)行ldconfig -v(更新動(dòng)態(tài)加載器緩存)就ok了。
另外,執(zhí)行sqlplus最好在本地,不要在SSH遠(yuǎn)程,不然會(huì)遇到:
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
這個(gè)錯(cuò)誤。
如果堅(jiān)持要那么做得話。先執(zhí)行source ~/.bash_profile
然后也可以了。
Oracle數(shù)據(jù)庫(kù)安裝錯(cuò)誤集錦: ◆1.如果你不能運(yùn)行./runInstaller ,提示x11 錯(cuò)誤,請(qǐng)使用root 輸入如下命令#xhost + ◆2.如果當(dāng)你輸入dbca命令之后在最后一步會(huì)莫名其妙的發(fā)生界面消失,并在命令行出現(xiàn)如下錯(cuò)誤消息: /oracle/product/9.2.0.1/bin/dbca: line 124: 27348 Killed $JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS時(shí),要解決這個(gè)問題,只需要執(zhí)行下面命令修改dbca腳本: vi $ORACLE_HOME/bin/dbca 從第118行開始,將第118、119、121、122、123、124共6行都用"#"符號(hào)注釋掉,結(jié)果如下: #if [ -f /etc/rac_on ]; then #Run DBCA $JRE_DIR/bin/jre –native –DORACLE_HOME=$OH…… #else #Run DBCA #$JRE_DIR/bin/jre –DORACLE_HOME=$OH…… #fi 修改完成之后再運(yùn)行dbca重建數(shù)據(jù)庫(kù)。如果這一步?jīng)]有做處理,將會(huì)導(dǎo)致創(chuàng)建的數(shù)據(jù)庫(kù)沒有init配置文件,無(wú)法啟動(dòng). ◆3.ORA-00988:missing or invalid password(s) 問題: 遇到 ORA-00988 missing or invalid password (口令缺失或無(wú)效) 錯(cuò)誤,怎么辦?解答: 在設(shè)置數(shù)據(jù)庫(kù)實(shí)例的密碼時(shí),注意不要以數(shù)字開頭,否則您將會(huì)遇到 ORA-00988 missing or invalid password (口令缺失或無(wú)效) 錯(cuò)誤。 Oracle 10g 安裝完成后,您可使用 dbca 命令創(chuàng)建新的數(shù)據(jù)庫(kù)實(shí)例,或維護(hù)已有的數(shù)據(jù)庫(kù)實(shí)例。如果您安裝的是 Oracle XE 數(shù)據(jù)庫(kù),則必須反安裝 Oracle XE 后重新安裝 Oracle XE,并在安裝過程中指定非數(shù)字開頭的密碼 (例如 password 或 pswd123)。 ◆4.建庫(kù)時(shí)候遇到的問題 ORA-29807: specified operator does not exist 這是Oracle 的bug , 可以忽略掉,安裝完成后,在$ORACLE_HOME/rdbms/admin 目錄下運(yùn)行utlrp.sql ,用于修補(bǔ)ORA-29807 錯(cuò)誤。 解釋: ORA-29807: specified operator does not exist This is a known issue (bug 2925665). You can click on the "Ignore" button to continue. Once DBCA has completed database creation, remember to run the 'prvtxml.plb' script from $ORACLE_HOME/rdbms/admin independently, as the user SYS. It is also advised to run the 'utlrp.sql' script to ensure that there are no invalid objects in the database at this time. 很多人進(jìn)了sqlplus不會(huì)跑sql,其實(shí)很簡(jiǎn)單。 比如我這里吧,登錄之后,@/home/oracle/a.sql; 就行了。 ◆5.執(zhí)行sqlplus出現(xiàn)的問題 error while loading shared libraries: libclntsh.so.9.0: cannot open shared object file: No such file or directory libclntsh.so.9.0這個(gè)庫(kù)是oracle 9i:OCI客戶端運(yùn)行時(shí)庫(kù),如果程序使用了oci讀寫數(shù)據(jù)庫(kù)必定會(huì)裝載這個(gè)庫(kù),它一般在/ 安裝路徑>/product/9.x.x/lib,除非你沒有安裝oracle客戶端的話(在安裝時(shí)),就會(huì)出現(xiàn)找不到這個(gè)庫(kù)這個(gè)問題。 如果安裝了,那么程序運(yùn)行時(shí)還是要在/etc/ld.so.conf所列路徑下、和LD_LIBRARY_PATH所列路徑下去尋找這個(gè)庫(kù),如果這兩個(gè)地方都找不到就會(huì)報(bào)錯(cuò),說找不到這個(gè)庫(kù)。我估計(jì)你的/etc/ld.so.conf下肯定沒有包含//product/9.x.x/lib這個(gè)路徑,但你的用戶shell啟動(dòng)腳本(.bash_profile)設(shè)置了。 LD_LIBRARY_PATH=//product/9.x.x/lib:...這個(gè)環(huán)境變量,所以你用用戶賬號(hào)運(yùn)行程序是沒問題的。但crontab有自 己的用戶賬號(hào),crontab運(yùn)行時(shí)并不會(huì)設(shè)置LD_LIBRARY_PATH=//product/9.x.x/lib: 。所以就找不到庫(kù)了。 解決辦法: 將//product/9.x.x/lib路徑加入/etc/ld.so.conf,并運(yùn)行ldconfig -v(更新動(dòng)態(tài)加載器緩存)就ok了。 另外,執(zhí)行sqlplus最好在本地,不要在SSH遠(yuǎn)程,不然會(huì)遇到: Error 6 initializing SQL*Plus Message file sp1.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory 這個(gè)錯(cuò)誤。 如果堅(jiān)持要那么做得話。先執(zhí)行source ~/.bash_profile 然后也可以了。
聯(lián)系客服