Oracle8i Administrator\"s Reference Release 8.1.5 for Intel Linux (A74957-01)
Chapter 1 - Administering Oracle8i
Controlling the System Global Area
Size Limits of the SGA
The maximum size of a single shared memory region is specified by the Linux parameter SHMMAX. For example, if SHMMAX is 512 KB and the SGA is 2048 KB, the SGA requires four segments.
If the size of the SGA exceeds the maximum size of a shared memory segment (SHMMAX), Oracle8i attempts to attach more contiguous segments to fulfill the requested SGA size. SHMSEG is the maximum number of segments that can be attached by a process. To attach the segments at contiguous addresses, SHMMAX must be set to its maximum value on systems where its size is limited.
Note: Intimate Shared Memory (ISM) may cause problems when SHMMAX is smaller than the database SGA size.
Oracle8i Installation Guide Release 8.1.5 for Intel Linux (A74958-0)
Chaper 2 - Setting the Environment
Setup Task to Perform as the root User
Create a Linux Account to Own Oracle Software
The oracle account is the Linux account that owns the Oracle8i software after installation. You must run the OUI from this account. On Intel-Linux, use the operating system administration utility useradd to create an oracle account with the following properties:
Login Name Any name, but this document refers to it as the oracle account.
Default GID Corresponding to the oinstall group.
而另一方面,Oracle8i Linux管理指南说Linux oracle帐号应该属于dba组:
Oracle8i Administrator\"s Reference Release 8.1.5 for Intel Linux (A74957-01)
Chapter 1 - Administering Oracle8i
Managing Special Accounts and Groups (Table 1-8)
The oracle software owner is the only required member of the dba group. You can add the root user, or any other Linux user, to the dba group. Members of this group have access to SQL*Plus specially privileged functions. If your account is not a member of the dba group, you must enter a password in order to connect as INTERNAL or gain access to the other administrative functions of SQL*Plus. The default group ID is dba.
JNLS Exception:oracle.ntp.jnls.JNLSException Unable to find anyNational Character Sets.
Please check your Oracle installation.
只要忽略这条消息并且继续。当你被提示创建、修改或删除一个数据库时,就取消,并且完全退出Oracle通用安装程序。我们需要首先使用补丁。
6. Just before the DB Assistant is launched, a dialog is displayed withthe warning:\"JNLS Exception:
oracle.ntp.jnls.JNLSException Unable to find any National Character Sets. Please check your Oracle
installation.\"
This is a known problem (884001). Ignore the warning
JNLS Exception:oracle.ntp.jnls.JNLSException Unable to find anyNational Character Sets.
Please check your Oracle installation.
只要忽略这条消息并且继续。这是摘自8i补丁的常见问题关于上面错误消息的文字:
6. Just before the DB Assistant is launched, a dialog is displayed withthe
warning:\"JNLS Exception: oracle.ntp.jnls.JNLSException Unable to find any National
Character Sets. Please check your Oracle installation.\" This is a known problem
(884001). Ignore the warning
实际上,你不必使用数据库助手创建一个数据库。你可以得到页脚本来做它。详见item number 9 on the 8i patch FAQ。然而,这个文件假定你使用数据库助手。
3.2 使用定制安装/专用服务器模式
当提示在Typical(典型)与Custom(定制)之间选择时,选择定制,同样,当提示在Dedicated Server Mode(专用服务器模式)和Shared Server Mode(共享服务器模式)之间选择时,选择专用服务器模式。如果你需要一个使用共享服务器模式(MTS)的数据库,你可以一开始创建一个使用专用服务器模式的数据库并在以后改变为共享服务器模式或MTS。如果你坚持创建一个使用共享服务器模式的数据库,一旦被启动,你可能得到这个错误:
ORA-01012: Not logged in
其原因在下面介绍,下文摘自Oracle8i Concept 文档(没包含在Oracle8i EE Linux CD,但是包含在Oracle8i EE NT CD!):
Oracle8i Concepts Release 8.1.5
A67781-01
Chapter 8
Restricted Operations of the Multi-Threaded Server
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.
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.
使用专用服务器的另一个原因,至少目前,是当创建一个实例(instance)时,使用BEQ协议,因为还没有设置任何监听器,至少没在一开始的安装时设置。BEQ协议是唯一一个不要求监听器正在运行的协议,并且只能用在Oracle正在运行的同一台机器上。还有,BEQ协议总是使用一个专用服务器,绝不是一个多线程服务器(MTS)。这是摘自Oracle8i Administration Reference for Linux的文字:
Oracle8i Administrator\"s Reference Release 8.1.5 for Intel Linux
A74957-01
Chapter 5
The BEQ Protocol
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.
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.
对于共享池的尺寸,我修改shared_pool_size与其他数据库一样。我能记得dbassist说过类似于“you need at least 50mb for shared_pool_size with the JServer option”的东西。
shared_pool_size = 52428800
OPW-00005: File with same name exists - please delete or rename
在我的情况中,我不仅删除了先前的口令文件,我也删除了文件$ORACLE_HOME/dbs/lkSID。这个文件似乎在你创建数据库时创建,实际上它只是一个文本文件:\"DO NOT DELETE THIS FILE!\"
你可能碰到的其他错误如下:
ORA-01501: CREATE DATABASE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: \"/home/oracle/app/oracle/oradata/8idb/dbs/control02.ctl\"
ORA-27040: skgfrcre: create error, unable to create file
Linux Error: 2: No such file or directory
在/etc/rc.d/init.d里创建一个脚本,起名为oracle8i,并把下面的代码放进去,它是在\"Oracle8i Linux Installation Guide\"提供的脚本基础上的一个修改版本。注意在该指南中的脚本由一个bug,阻止它关掉Oracle8i数据库。这在下面解释。
#!/bin/sh
# Set ORA_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and
# dbshut
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME