📄 在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 + -