1. 程式人生 > >在安裝oracle中遇到問題彙總

在安裝oracle中遇到問題彙總

在安裝oracle中遇到的問題

1、配置磁碟分割槽時,/root最大隻能50G,/home 860G,想把/Home的磁碟空間設定為50G,其他移到/根目錄下

      出現這個原因是,第一次預設安裝的時候centos提供的建議分割槽方案,下次重新安裝centos時,會預設以上次分割槽方案為準,需要進入自主建立分割槽,刪除系統提供的分割槽方案,然後建立/root(掛載到/根目錄)和swap分割槽,/home不要特意分割槽設定大小。

2、sysctl -p錯誤


    fs.file-max = 6815744
    fs.aio-max-nr = 1048576
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    "sysctl.conf" 54L, 1461C
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 4194304
    net.core.rmem_max=4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576

    由於把 kernel.shmmni寫成 kernel.shmmin導致編譯不成功,直接導致執行sysctl -p命令時,提示sysctl命令不存在。因此在編寫指令碼時,要特別小心確保每一個單詞都是正確的,每一個字母大小寫都是正確的(linux區分大小寫),同時要特別注意編譯器提示的訊息。

3、sysctl -p顯示錯誤

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key

解決方法:參考http://serverfault.com/questions/477718/sysctl-p-etc-sysctl-conf-returns-error

modprobe bridge
lsmod | grep bridge

4、出現root和oracle使用者的配置資訊錯誤

-bash: [root: command not found

-bash: [oracle: command not found

出現原因是沒有加雙引號和空格

if [ "$USER" = "oracle" ] ; then
    if [ "$SHELL" = "/bin/ksh"] ; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi  
fi

5、-bash: [: missing `]'

原因 :缺少空格導致

6、執行 ./runInstall時亂碼

解決:在oracle賬戶中執行export LANG=en_US

7、No protocol specified
Exception in thread "main" java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.Toolkit$2.run(Toolkit.java:821)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
at oracle.install.commons.util.Application.startup(Application.java:758)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

解決方法:登出root賬戶,在oracle賬戶下執行./runInstall ,不能使用 su - oracle

8、The password entered does not conform to the Oracle recommended standards.
解決方法:密碼設定複雜一些
 
9、central inventory location was not writable

給資料夾設定許可權:chown -R oracle:oinstall /usr/oracle

10、ip address  localhost could not be determined

vi  /etc/hosts 將主機名新增到127.0.0.1的主機名列表中

hostname RAID

11、the selected oracle home contained directories or files

       to start with an enpty oracle home, either remove its contents or choose another location

解決方法將/usr/oracle中的所有檔案和資料夾刪除\

11、this is a prerequisite condition to test whether the package "make-3.8"

解決方法: yum -y install gcc automake autoconf libtool make

12、每次重啟伺服器後/etc/resolv.conf中的nameserver設定全部被清空

解決方法:在/etc/network-scripts/ifcfg-em1中新增DNS1=192.168.1.1

13、this is a prerequisite condition to test whether the package "make-3.8"

解決方法:yum install make

14、在安裝oracle中斷後,重啟centos後,在本機使用root使用者名稱和密碼(使用者名稱密碼正確)一直無法登入成功

解決方法:安裝oracle過程中,一般的安裝文件中都會提到要設定/etc/security/limits.conf和/etc/pam.d/login引數檔案來限制oracle伺服器可以開啟的檔案數、程序數等等資源的限制,於是會需要在/etc/pam.d/login 檔案中新增session required /lib/security/pam_limits.so一行內容來實現/etc/security/limits.conf中定義的各項限制,和通過ulimit命令直接設定資源設定類似,此機器的安裝過程中也是這樣設定的,可是問題就出現在這裡了。

此機器使用的是64位的作業系統,因此根本沒有/lib/security/pam_limits.so檔案存在,而應該使用替代的/lib64/security/pam_limits.so檔案來代替,否則在登陸的時候找不到這個檔案,就會出現本機不能登陸的情況。


15、ORA-01017: invalid username/password; logon denied

錯誤原因:Oracle密碼丟失,賬號被鎖解決方案

解決方案:

SQL>sqlplus

SQL>conn/as   sysdba

SQL>alter   user   system   identified   by   system;

16、Oracle the network adapter could not establish the connection 異常

原因:埠沒有開放,沒有開放1521

解決:lsnrctl start

17、linux TNS:listener does not currently know of service requested in connect

原因:沒有啟動oracle服務

解決方法:./dbstart

修改本地環境變數,設定

1、執行 select * from v$nls_parameters; 查詢oracle服務端的NLS_LANG和NLS_CHARACTERSET

1、進入 我的電腦,屬性,高階,環境變數,新增2項:LANG=zh_CN.GBK 和 NLS_LANG=oracle服務端的NLS_LANG的值

2、在pl/sql developer的選單->tools->preferences->user interface->fonts 中修改為中文字型