?? 在redhat6_0上安裝oracle8i(全攻略) ╃web-apache服務器技術╃ 有風信息港 - powered by phpwind_net.htm
字號:
<P>增大你的交換區 <SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">K5K;~zZF
</SPAN> <BR>當使用install/linux/runInst.sh時,增加由Java使用的堆大小,通過將傳遞給jre的參數從-mx64mb改為-mx100mb。
<SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">I>fV \5Z
</SPAN> <BR>2.2 安裝所有Oracle選件 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">/RH#iB!z
</SPAN> <BR>你可以選擇安裝或不安裝的Oracle選件是Time Series Option、Visual
Retrieval Information Option、Spatial Option、和interMedia
Option。其他Oracle 選件例如JServer、Parallel Option、和Partitioning
Options被缺省安裝。 </P><BR>
<P>當你到了選件要安裝的對話時,不管你是否想使用Oracle選件,安裝Oracle所有選件。Oracle選件將不被使用,直到你決定在一個數據庫中使用他們。
</P><BR>
<P>安裝所有Oracle選件的原因是由于$ORACLE_HOME/bin/relink腳本的一個bug。這個腳本在每次升級后或Oracle8i打補丁后都要運行。然而,似乎腳本假定所有的庫文件,包括哪些Oracle自帶的選件,都存在。如果它不能找到甚至一個庫文件,重新鏈接就失敗。
</P><BR>
<P>如果你碰巧使用了原來的8.1.5.0.1補丁并且注意了sqlplus或svrmgrl仍然報告是8.1.5.0.0,這是因為,是由于丟失庫文件而導致重新鏈接失敗。在我第一次安裝時,我取消了我能取消的所有Oracle選件。在使用補丁以后,錯誤記錄(如果你做了一個)將顯示出:
</P><BR>
<P>/usr/bin/ld: Cannot open -lordsdo8: No such file or directory
</P><BR>
<P>當你不安裝Oracle選件而使用8.1.5.0.2補丁,情況是更糟糕。你甚至不能運行svrmgrl: </P><BR>
<P>ORA-12545 Connect failed because target host or object does not
exist. </P><BR>
<P>2.3 不要用數據庫助手創建數據庫 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">NMmB3h?0c
</SPAN> <BR>在安裝完成后,Oracle數據庫助手將運行。注意,即使你在以前的提示你是否要用數據庫助手創建一個數據庫的一個對話框回答“No”,它仍將運行。
</P><BR>
<P>當你運行數據庫助手時,你將得到一條錯誤消息: </P><BR>
<P>JNLS Exception:oracle.ntp.jnls.JNLSException Unable to find
anyNational Character Sets. <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">;&* iO
</SPAN> <BR>Please check your Oracle installation. <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">]9i[+lF-
</SPAN> <BR>只要忽略這條消息并且繼續。當你被提示創建、修改或刪除一個數據庫時,就取消,并且完全退出Oracle通用安裝程序。我們需要首先使用補丁。
</P><BR>
<P>以下是從8i補丁的常見問題有關上面錯誤消息的文字: </P><BR>
<P><SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">*?_E-'|-O
</SPAN> <BR>--------------------------------------------------------------------------------
</P><BR>
<P>6. Just before the DB Assistant is launched, a dialog is
displayed withthe warning:"JNLS Exception: <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">!5NcAo/3?'
</SPAN> <BR>oracle.ntp.jnls.JNLSException Unable to find any
National Character Sets. Please check your Oracle <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">sU:5D`S
</SPAN> <BR>installation." </P><BR>
<P>This is a known problem (884001). Ignore the warning </P><BR>
<P>--------------------------------------------------------------------------------
</P><BR>
<P>2.4 使用 Oracle8i 補丁 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">D["^ii D_9
</SPAN> <BR>從Oracle Technology
Network獲得最新的補丁。目前,最新的補丁是8.1.5.0.2。8.1.5.0.2 補丁是一個累積的補丁。它包括8.1.5.0.1
補丁。運行補丁并通過檢查/tmp/81501.log和/tmp/81502.log查看任何錯誤。檢查是否在這些腳本中有重新連接失敗。用grep找詞“fail”。如果重新連接失敗,有可能是沒有安裝Oracle所有選件。見“安裝所有Oracle選件”。
</P><BR>
<P>3. 創建一個數據庫 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">owNSOk{O
</SPAN> <BR>3.1 運行數據庫助手 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">X^;@t[;gS
</SPAN> <BR>既然你使用了最新的補丁,你現在已經準備好創建你的數據庫了。運行dbassist。你將得到這樣一條錯誤消息:
</P><BR>
<P>JNLS Exception:oracle.ntp.jnls.JNLSException Unable to find
anyNational Character Sets. <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">$VIlQ!cu
</SPAN> <BR>Please check your Oracle installation. <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">:<)rc$
</SPAN> <BR>只要忽略這條消息并且繼續。這是摘自8i補丁的常見問題關于上面錯誤消息的文字: </P><BR>
<P><SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">1(MU%-hJ
</SPAN> <BR>--------------------------------------------------------------------------------
</P><BR>
<P>6. Just before the DB Assistant is launched, a dialog is
displayed withthe <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">Vir-`QtC
</SPAN> <BR>warning:"JNLS Exception:
oracle.ntp.jnls.JNLSException Unable to find any National <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">E2V-C:an
</SPAN> <BR>Character Sets. Please check your Oracle
installation." This is a known problem <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">ad^Y}
</SPAN> <BR>(884001). Ignore the warning </P><BR>
<P>--------------------------------------------------------------------------------
</P><BR>
<P>實際上,你不必使用數據庫助手創建一個數據庫。你可以得到頁腳本來做它。詳見item number 9 on the 8i patch
FAQ。然而,這個文件假定你使用數據庫助手。 </P><BR>
<P>3.2 使用定制安裝/專用服務器模式 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">L$^pS}-
</SPAN> <BR>當提示在Typical(典型)與Custom(定制)之間選擇時,選擇定制,同樣,當提示在Dedicated
Server Mode(專用服務器模式)和Shared Server
Mode(共享服務器模式)之間選擇時,選擇專用服務器模式。如果你需要一個使用共享服務器模式(MTS)的數據庫,你可以一開始創建一個使用專用服務器模式的數據庫并在以后改變為共享服務器模式或MTS。如果你堅持創建一個使用共享服務器模式的數據庫,一旦被啟動,你可能得到這個錯誤:
</P><BR>
<P>ORA-01012: Not logged in </P><BR>
<P>其原因在下面介紹,下文摘自Oracle8i Concept 文檔(沒包含在Oracle8i EE Linux
CD,但是包含在Oracle8i EE NT CD!): </P><BR>
<P>Oracle8i Concepts Release 8.1.5 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">zP_#k]Q=
</SPAN> <BR>A67781-01 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">]@S8ZF}
</SPAN> <BR>Chapter 8 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">#e5* LGD
</SPAN> <BR>Restricted Operations of the Multi-Threaded Server
<SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">(l>K^@n5
</SPAN> <BR>Certain administrative activities cannot be
performed while connected to a dispatcher process, including
shutting down or starting an instance and media recovery. An error
message is issued if you attempt to perform these activities while
connected to a dispatcher process. </P><BR>
<P>These activities are typically performed when connected with
administrator privileges. When you want to connect with
administrator privileges in a system configured with multi-threaded
servers, you must state in your connect string that you want to use
a dedicated server process (SRVR=DEDICATED) instead of a dispatcher
process. </P><BR>
<P><SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">drIwrQ\?
</SPAN> <BR>使用專用服務器的另一個原因,至少目前,是當創建一個實例(instance)時,使用BEQ協議,因為還沒有設置任何監聽器,至少沒在一開始的安裝時設置。BEQ協議是唯一一個不要求監聽器正在運行的協議,并且只能用在Oracle正在運行的同一臺機器上。還有,BEQ協議總是使用一個專用服務器,絕不是一個多線程服務器(MTS)。這是摘自Oracle8i
Administration Reference for Linux的文字: </P><BR>
<P>Oracle8i Administrator"s Reference Release 8.1.5 for Intel Linux
<SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">X- LX^P3
</SPAN> <BR>A74957-01 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">hF!^ {.wN
</SPAN> <BR>Chapter 5 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">CGH9&+g
</SPAN> <BR>The BEQ Protocol <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">av1B$[x4A
</SPAN> <BR>The BEQ protocol is both a communications mechanism
and a process-spawning mechanism. If a service name is not
specified, either directly by the user on the command line or the
login screen or indirectly through an environment variable such as
TWO_TASK, then the BEQ protocol is used. In which case, a dedicated
server will always be used, and the multi-threaded server is never
used. This dedicated server is started automatically by the BEQ
protocol, which waits for the server process to start and attach to
an existing SGA. If the startup of the server process is successful,
the BEQ protocol then provides inter-process communication through
UNIX. </P><BR>
<P>An important feature of the BEQ protocol is that no network
listener is required for its operation, since the protocol is linked
into the client tools and directly starts its own server process
with no outside interaction. However, the BEQ protocol can only be
used when the client program and Oracle8i reside on the same
machine. The BEQ protocol is always installed and always linked to
all client tools and to the Oracle8i Server. </P><BR>
<P><SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">+4JF(on!2[
</SPAN> <BR>如果上述仍然不能讓你工作,它可能是NLS_LANG環境變量設置不當的問題。見盡管我使用了專用服務器過程,仍然得到“
ORA-01012 :Not logged in”。 </P><BR>
<P>3.3 保存到腳本 <SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">S_>zUn
#}
</SPAN> <BR>當提示你是否要創建一個數據庫,或保存到腳本中并在以后運行腳本時,選擇保存到腳本。這將幫助你理解背后發生了什么并幫助你在數據庫創建期間診斷任何問題。
</P><BR>
<P>3.4 運行腳本 <SPAN style="FONT-SIZE: 0pt; COLOR: #ffffff">[`?=LWP
&
</SPAN> <BR>腳本將在$ORACLE_HOME/install中找到。你僅需運行一個腳本,因為它以正確的順序調用所有其他單獨的腳本。我建議你分別運行每個腳本。
</P><BR>
<P>當你運行第一個腳本時,名為SIDrun.sh,它將啟動實例并創建SYSTEM數據文件和表空間、控制文件和重做(redo)日志文件。運行其他腳本,名為SIDrun1.sh和SIDrun2.sh。
</P><BR>
<P>3.5 擴大你的重做日志文件 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">tZ7hu1>f2
</SPAN> <BR>如果你接受缺省的512K的重做日志文件大小和2個重做日志組,你會注意到在$ORACLE_BASE/admin/SID/bdump警告日志文件中找到這樣的消息:
</P><BR>
<P>Thread 1 cannot allocate new log, sequence 4 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">:"qF\:[Xy
</SPAN> <BR>Checkpoint not complete </P><BR>
<P>第一行的最后數字是變化的。這是因為重做日志文件尺寸太小。在這種情況下,再增加2個稍大些的(如4MB)重做日志記載組,刪除并重建前2個日志組使得所有的日志文件組有4MB的大小。
</P><BR>
<P>如果你對重做日志組沒有足夠大的尺寸,腳本SIDjava.sh,它在Oracle8i中初始化Java,可能不能完成并且失敗。如果你有較小的退回(rollback)片段,會發生同樣的事情。
</P><BR>
<P>現在運行其他腳本,按照主腳本提供的順序所指出的那樣。當你運行腳本SIDjava.sh時,即如果你選擇了JServer選件在數據庫中創建,注意它可能花很長時間。罪魁禍首就是SQL語句create或REPLACE
JAVA SYSTEM。 </P><BR>
<P>3.6 修改你的init.ora文件 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">/\2k^h5UwX
</SPAN> <BR>由數據庫助手生成的init.ora文件沒有指明要使用的退回片段。這已經被指出來了,因為實例的初始啟動還沒有生成退回片段,除了在SYSTEM中的片段。
</P><BR>
<P>因此你需要修改你的位于$ORACLE_BASE/admin/pfile中的init.ora文件并且為ROLLBACK_SEGMENTS提供值。
</P><BR>
<P>3.7 不用數據庫助手創建一個數據庫 <SPAN
style="FONT-SIZE: 0pt; COLOR: #ffffff">m%r{s$42
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -