前言:
=======================================================
Oracle 7.3.4 for sco 的数据库系统是无法在 SCO OpenServer 6 系列的操作系统上正常安装和使用的,这是因为 Oracle 7.3.4 for sco 的数据库是针对 SCO OpenServer 5.0.x 系统开发的,准确的说是针对 SCO OpenServer 5.0.5 系统开发的,在 SCO OpenServer 5.0.7 系统上进行安装,需要替换 /usr/ccs/lib/crt0.0 和 /usr/ccs/lib/crt1.o 这两个文件才能正常安装(安装完成后还得替换回来)。而在 SCO OpenServer 6 操作系统上,即使替换了这两个文件,也无法正常安装。
但这并不是说不能在 SCO OpenServer 6 操作系统上正常安装和使用 Oracle 7.3.4 for SCO 数据库,我们可以在 SCO OpenServer 5.0.5或 SCO OpenServer 5.0.7 操作系统上选择 “Do Not Create DB Object”的方式进行安装,安装完成后,我们将安装的程序文件直接迁移到 SCO OpenServer 6 操作系统的相同环境下,即可实现在 SCO OpenServer 6 操作系统上正常安装使用 Oracle 7.3.4 for SCO 数据库的目标。
系统安装与初始化
==========================================================
1、基本要求
系统必须是 SCO OpenServer 6 D2M1的,这是因为 SCO OpenServer 6 D2M1 系统相比
SCO OpenServer 6Ni 而言,打上了 Maintenance Pack5 的补丁包。
2、基础环境配置与调整
2.1、添加用户组、用户并设置环境变量。
# 添加用户和用户组
-
groupadd dba
-
useradd -d /usr/oracle -g dba -s /usr/bin/bash -m oracle
-
passwd oracle
# 设置环境变量(vi /usr/oracle/.bashrc)
-
ORACLE_BASE=/usr/oracle
-
ORACLE_HOME=/usr/oracle/product/734
-
ORACLE_SID=oracle
-
ORACLE_TERM=ansi
-
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
-
ORACLE_NLS32=$ORACLE_HOME/ocommon/nls/admin/data
-
ORACLE_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/opt/bin:/usr/lbin:.
-
ULIMIT=2297152
-
TERM=ansi
-
TMPDIR=/u/tmp
-
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/opt/bin:/usr/lbin:.
-
export ORACLE_BASE ORACLE_HOME ORACLE_SID
-
export ORACLE_TERM LD_LIBRARY_PATH
-
export ORACLE_NLS32 ORACLE_PATH ULIMIT TERM TMPDIR PATH
2.2 创建数据挂载点
-
$ mkdir -p $ORACLE_HOME/u0/oradata/oracle
-
$ mkdir -p $ORACLE_HOME/u0/oradata/oracle
-
$ mkdir -p $ORACLE_HOME/u0/oradata/oracle
2.3 oracle 数据库软件安装与初始化
# 本例中,我已经将安装在 SCO OpenServer 5.0.7 系统上的 oracle 7.3.4 的软件压缩打包了,文件名为 oracle_734_osr6_bin.tar.gz 。
-
# su - oracle
-
$ cp oracle_734_osr6_bin.tar.gz /tmp
-
$ cd /tmp
-
$ gzip -d oracle_734_osr6_bin.tar.gz
-
$ cd
-
$ tar xvf /tmp/oracle_734_osr6_bin.tar
2.4 添加并修改初始化文件
# vi $ORACLE_BASE/admin/oracle/pfile/initoracle.ora
-
#
-
# $Header: initx.orc 1.1 95/02/27 12:14:56 wyim Osd<unix> $ Copyr (c) 1992 Oracle
-
#
-
-
# include database configuration parameters
-
ifile = /usr/oracle/product/admin/oracle/pfile/configoracle.ora
-
-
rollback_segments = (r01,r02,r03,r04)
-
-
##############################################################################
-
# Example INIT.ORA file
-
#
-
# This file is provided by Oracle Corporation to help you customize
-
# your RDBMS installation for your site. Important system parameters
-
# are discussed, and example settings given.
-
#
-
# Some parameter settings are generic to any size installation.
-
# For parameters that require different values in different size
-
# installations, three scenarios have been provided: SMALL, MEDIUM
-
# and LARGE. Any parameter that needs to be tuned according to
-
# installation size will have three settings, each one commented
-
# according to installation size.
-
#
-
# Use the following table to approximate the SGA size needed for the
-
# three scenarious provided in this file:
-
#
-
# -------Installation/Database Size------
-
# SMALL MEDIUM LARGE
-
# Block 2K 4500K 6800K 17000K
-
# Size 4K 5500K 8800K 21000K
-
#
-
# To set up a database that multiple instances will be using, place
-
# all instance-specific parameters in one file, and then have all
-
# of these files point to a master file using the IFILE command.
-
# This way, when you change a public
-
# parameter, it will automatically change on all instances. This is
-
# necessary, since all instances must run with the same value for many
-
# parameters. For example, if you choose to use private rollback segments,
-
# these must be specified in different files, but since all gc_*
-
# parameters must be the same on all instances, they should be in one file.
-
#
-
# INSTRUCTIONS: Edit this file and the other INIT files it calls for
-
# your site, either by using the values provided here or by providing
-
# your own. Then place an IFILE= line into each instance-specific
-
# INIT file that points at this file.
-
###############################################################################
-
-
# tuning parameters
-
-
db_files = 20
-
-
# db_file_multiblock_read_count = 8 # SMALL
-
# db_file_multiblock_read_count = 16 # MEDIUM
-
db_file_multiblock_read_count = 32 # LARGE
-
-
# db_block_buffers = 200 # SMALL
-
# db_block_buffers = 550 # MEDIUM
-
db_block_buffers = 3200 # LARGE
-
-
# shared_pool_size = 3500000 # SMALL
-
# shared_pool_size = 6000000 # MEDIUM
-
shared_pool_size = 9000000 # LARGE
-
-
log_checkpoint_interval = 10000
-
-
processes = 50 # SMALL
-
# processes = 100 # MEDIUM
-
# processes = 200 # LARGE
-
-
# dml_locks = 100 # SMALL
-
# dml_locks = 200 # MEDIUM
-
dml_locks = 500 # LARGE
-
-
# log_buffer = 8192 # SMALL
-
# log_buffer = 32768 # MEDIUM
-
log_buffer = 163840 # LARGE
-
-
# sequence_cache_entries = 10 # SMALL
-
# sequence_cache_entries = 30 # MEDIUM
-
sequence_cache_entries = 100 # LARGE
-
-
# sequence_cache_hash_buckets = 10 # SMALL
-
# sequence_cache_hash_buckets = 23 # MEDIUM
-
sequence_cache_hash_buckets = 89 # LARGE
-
-
# audit_trail = true # if you want auditing
-
# timed_statistics = true # if you want timed statistics
-
max_dump_file_size = 10240 # limit trace file size to 5 Meg each
-
-
# log_archive_start = true # if you want automatic archiving
-
-
compatible = 7.3.0.0
-
global_names = TRUE
-
-
mts_dispatchers="ipc,1"
-
mts_max_dispatchers=10
-
mts_servers=1
-
mts_max_servers=10
-
mts_service=oracle
-
mts_listener_address="(ADDRESS=(PROTOCOL=ipc)(KEY=oracle))"
# vi $ORACLE_BASE/admin/oracle/pfile/initoracle_0.ora
-
#
-
# $Header: initx.orc 1.1 95/02/27 12:14:56 wyim Osd<unix> $ Copyr (c) 1992 Oracle
-
#
-
-
# include database configuration parameters
-
ifile = /usr/oracle/product/admin/oracle/pfile/configoracle.ora
-
-
rollback_segments = ()
-
-
##############################################################################
-
# Example INIT.ORA file
-
#
-
# This file is provided by Oracle Corporation to help you customize
-
# your RDBMS installation for your site. Important system parameters
-
# are discussed, and example settings given.
-
#
-
# Some parameter settings are generic to any size installation.
-
# For parameters that require different values in different size
-
# installations, three scenarios have been provided: SMALL, MEDIUM
-
# and LARGE. Any parameter that needs to be tuned according to
-
# installation size will have three settings, each one commented
-
# according to installation size.
-
#
-
# Use the following table to approximate the SGA size needed for the
-
# three scenarious provided in this file:
-
#
-
# -------Installation/Database Size------
-
# SMALL MEDIUM LARGE
-
# Block 2K 4500K 6800K 17000K
-
# Size 4K 5500K 8800K 21000K
-
#
-
# To set up a database that multiple instances will be using, place
-
# all instance-specific parameters in one file, and then have all
-
# of these files point to a master file using the IFILE command.
-
# This way, when you change a public
-
# parameter, it will automatically change on all instances. This is
-
# necessary, since all instances must run with the same value for many
-
# parameters. For example, if you choose to use private rollback segments,
-
# these must be specified in different files, but since all gc_*
-
# parameters must be the same on all instances, they should be in one file.
-
#
-
# INSTRUCTIONS: Edit this file and the other INIT files it calls for
-
# your site, either by using the values provided here or by providing
-
# your own. Then place an IFILE= line into each instance-specific
-
# INIT file that points at this file.
-
###############################################################################
-
-
# tuning parameters
-
-
db_files = 20
-
-
# db_file_multiblock_read_count = 8 # SMALL
-
# db_file_multiblock_read_count = 16 # MEDIUM
-
db_file_multiblock_read_count = 32 # LARGE
-
-
# db_block_buffers = 200 # SMALL
-
# db_block_buffers = 550 # MEDIUM
-
db_block_buffers = 3200 # LARGE
-
-
# shared_pool_size = 3500000 # SMALL
-
# shared_pool_size = 6000000 # MEDIUM
-
shared_pool_size = 9000000 # LARGE
-
-
log_checkpoint_interval = 10000
-
-
processes = 50 # SMALL
-
# processes = 100 # MEDIUM
-
# processes = 200 # LARGE
-
-
# dml_locks = 100 # SMALL
-
# dml_locks = 200 # MEDIUM
-
dml_locks = 500 # LARGE
-
# log_buffer = 8192 # SMALL
-
# log_buffer = 32768 # MEDIUM
-
log_buffer = 163840 # LARGE
-
-
# sequence_cache_entries = 10 # SMALL
-
# sequence_cache_entries = 30 # MEDIUM
-
sequence_cache_entries = 100 # LARGE
-
-
# sequence_cache_hash_buckets = 10 # SMALL
-
# sequence_cache_hash_buckets = 23 # MEDIUM
-
sequence_cache_hash_buckets = 89 # LARGE
-
-
# audit_trail = true # if you want auditing
-
# timed_statistics = true # if you want timed statistics
-
max_dump_file_size = 10240 # limit trace file size to 5 Meg each
-
-
# log_archive_start = true # if you want automatic archiving
-
-
compatible = 7.3.0.0
-
global_names = TRUE
-
-
mts_dispatchers="ipc,1"
-
mts_max_dispatchers=10
-
mts_servers=1
-
mts_max_servers=10
-
mts_service=oracle
-
mts_listener_address="(ADDRESS=(PROTOCOL=ipc)(KEY=oracle))"
# vi $ORACLE_BASE/admin/oracle/pfile/configoracle.ora
-
#
-
# $Header: cnfg.orc 1.1 95/02/27 12:14:25 wyim Osd<unix> $ Copyr (c) 1992 Oracle
-
#
-
# cnfg.ora - instance configuration parameters
-
-
control_files = (/usr/oracle/product/734/u0/oradata/oracle/control01.ctl,
-
/usr/oracle/product/734/u1/oradata/oracle/control02.ctl,
-
/usr/oracle/product/734/u2/oradata/oracle/control03.ctl)
-
# Below for possible future use...
-
#init_sql_files = (?/dbs/sql.bsq,
-
# ?/rdbms/admin/catalog.sql,
-
# ?/rdbms/admin/expvew.sql)
-
background_dump_dest = /usr/oracle/product/admin/oracle/bdump
-
core_dump_dest = /usr/oracle/product/admin/oracle/cdump
-
user_dump_dest = /usr/oracle/product/admin/oracle/udump
-
#log_archive_dest = /usr/oracle/product/admin/oracle/arch/arch.log
-
#db_block_size = <blocksize>
-
-
db_name = oracle
# vi $ORACLE_BASE/product/734/dbs/init.ora
-
#
-
# $Header: init.ora 19-aug-97.14:46:18 hpiao Exp $
-
#
-
# Copyright (c) 1991, 1997 by Oracle Corporation
-
# NAME
-
# init.ora
-
# FUNCTION
-
# NOTES
-
# MODIFIED
-
# hpiao 08/19/97 - merge from 733
-
# hpiao 08/19/97 -
-
# alingelb 09/19/94 - remove vms-specific stuff
-
# dpawson 07/07/93 - add more comments regarded archive start
-
# maporter 10/29/92 - Add vms_sga_use_gblpagfile=TRUE
-
# jloaiza 03/07/92 - change ALPHA to BETA
-
# danderso 02/26/92 - change db_block_cache_protect to _db_block_cache_p
-
# ghallmar 02/03/92 - db_directory -> db_domain
-
# maporter 01/12/92 - merge changes from branch 1.8.308.1
-
# maporter 12/21/91 - bug 76493: Add control_files parameter
-
# wbridge 12/03/91 - use of %c in archive format is discouraged
-
# ghallmar 12/02/91 - add global_names=true, db_directory=us.acme.com
-
# thayes 11/27/91 - Change default for cache_clone
-
# jloaiza 08/13/91 - merge changes from branch 1.7.100.1
-
# jloaiza 07/31/91 - add debug stuff
-
# rlim 04/29/91 - removal of char_is_varchar2
-
# Bridge 03/12/91 - log_allocation no longer exists
-
# Wijaya 02/05/91 - remove obsolete parameters
-
#
-
##############################################################################
-
# Example INIT.ORA file
-
#
-
# This file is provided by Oracle Corporation to help you customize
-
# your RDBMS installation for your site. Important system parameters
-
# are discussed, and example settings given.
-
#
-
# Some parameter settings are generic to any size installation.
-
# For parameters that require different values in different size
-
# installations, three scenarios have been provided: SMALL, MEDIUM
-
# and LARGE. Any parameter that needs to be tuned according to
-
# installation size will have three settings, each one commented
-
# according to installation size.
-
#
-
# Use the following table to approximate the SGA size needed for the
-
# three scenarious provided in this file:
-
#
-
# -------Installation/Database Size------
-
# SMALL MEDIUM LARGE
-
# Block 2K 4500K 6800K 17000K
-
# Size 4K 5500K 8800K 21000K
-
#
-
# To set up a database that multiple instances will be using, place
-
# all instance-specific parameters in one file, and then have all
-
# of these files point to a master file using the IFILE command.
-
# This way, when you change a public
-
# parameter, it will automatically change on all instances. This is
-
# necessary, since all instances must run with the same value for many
-
# parameters. For example, if you choose to use private rollback segments,
-
# these must be specified in different files, but since all gc_*
-
# parameters must be the same on all instances, they should be in one file.
-
#
-
# INSTRUCTIONS: Edit this file and the other INIT files it calls for
-
# your site, either by using the values provided here or by providing
-
# your own. Then place an IFILE= line into each instance-specific
-
# INIT file that points at this file.
-
###############################################################################
-
db_name = DEFAULT
-
-
db_file_multiblock_read_count = 8 # SMALL
-
# db_file_multiblock_read_count = 16 # MEDIUM
-
# db_file_multiblock_read_count = 32 # LARGE
-
-
db_block_buffers = 60 # SMALL
-
# db_block_buffers = 550 # MEDIUM
-
# db_block_buffers = 3200 # LARGE
-
-
shared_pool_size = 3500000 # SMALL
-
# shared_pool_size = 5000000 # MEDIUM
-
# shared_pool_size = 9000000 # LARGE
-
-
log_checkpoint_interval = 10000
-
-
processes = 50 # SMALL
-
# processes = 100 # MEDIUM
-
# processes = 200 # LARGE
-
-
dml_locks = 100 # SMALL
-
# dml_locks = 200 # MEDIUM
-
# dml_locks = 500 # LARGE
-
-
log_buffer = 8192 # SMALL
-
# log_buffer = 32768 # MEDIUM
-
# log_buffer = 163840 # LARGE
-
-
sequence_cache_entries = 10 # SMALL
-
# sequence_cache_entries = 30 # MEDIUM
-
# sequence_cache_entries = 100 # LARGE
-
-
sequence_cache_hash_buckets = 10 # SMALL
-
# sequence_cache_hash_buckets = 23 # MEDIUM
-
# sequence_cache_hash_buckets = 89 # LARGE
-
-
# audit_trail = true # if you want auditing
-
# timed_statistics = true # if you want timed statistics
-
max_dump_file_size = 10240 # limit trace file size to 5 Meg each
-
-
# Uncommenting the line below will cause automatic archiving if archiving has
-
# been enabled using ALTER DATABASE ARCHIVELOG.
-
# log_archive_start = true
-
# log_archive_dest = disk$rdbms:[oracle.archive]
-
# log_archive_format = "T%TS%S.ARC"
-
-
# If using private rollback segments, place lines of the following
-
# form in each of your instance-specific init.ora files:
-
# rollback_segments = (name1, name2)
-
-
# If using public rollback segments, define how many
-
# rollback segments each instance will pick up, using the formula
-
# # of rollback segments = transactions / transactions_per_rollback_segment
-
# In this example each instance will grab 40/10 = 4:
-
# transactions = 40
-
# transactions_per_rollback_segment = 10
-
-
# Global Naming -- enforce that a dblink has same name as the db it connects to
-
global_names = TRUE
-
-
# Edit and uncomment the following line to provide the suffix that will be
-
# appended to the db_name parameter (separated with a dot) and stored as the
-
# global database name when a database is created. If your site uses
-
# Internet Domain names for e-mail, then the part of your e-mail address after
-
# the '@' is a good candidate for this parameter value.
-
-
# db_domain = us.acme.com # global database name is db_name.db_domain
-
-
# FOR DEVELOPMENT ONLY, DEFAULT TO SINGLE-PROCESS
-
# single_process = TRUE
-
-
# FOR DEVELOPMENT ONLY, ALWAYS TRY TO USE SYSTEM BACKING STORE
-
# vms_sga_use_gblpagfil = TRUE
-
-
# FOR BETA RELEASE ONLY. Enable debugging modes. Note that these can
-
# adversely affect performance. On some non-VMS ports the db_block_cache_*
-
# debugging modes have a severe effect on performance.
-
-
_db_block_cache_protect = true # memory protect buffers
-
event = "10210 trace name context forever, level 2" # data block checking
-
event = "10211 trace name context forever, level 2" # index block checking
-
event = "10235 trace name context forever, level 1" # memory heap checking
-
event = "10049 trace name context forever, level 2" # memory protect cursors
-
-
-
# define parallel server (multi-instance) parameters
-
#ifile = ora_system:initps.ora
-
-
# define two control files by default
-
control_files = (ora_control1, ora_control2)
# 在 $ORACLE_BASE/product/734/dbs 目录下建立 initoracle.ora、initoracle_0.ora、configoracle.ora 文件的软链接
# 使用 ln -sf 命令,具体的操作简单,略过。
2.5 在 $ORACLE_BASE/admin/oracle/create 目录下创建建库脚本文件 crdboracle.sql 和 crdb2oracle.sql
# vi $ORACLE_BASE/admin/oracle/create/crdboracle.sql
-
REM * Set terminal output and command echoing on; log output of this script.
-
REM *
-
#set termout on
-
#set echo on
-
spool /usr/oracle/admin/oracle/create/crdboracle.lst
-
-
REM * Start the <sid> instance (ORACLE_SID here must be set to <sid>).
-
REM *
-
connect internal
-
startup nomount pfile=/usr/oracle/admin/oracle/pfile/initoracle_0.ora
-
-
REM * Create the <dbname> database.
-
REM * SYSTEM tablespace configuration guidelines:
-
REM * General-Purpose ORACLE RDBMS 5Mb
-
REM * Additional dictionary for applications 10-50Mb
-
REM * Redo Log File configuration guidelines:
-
REM * Use 3+ redo log files to relieve ``cannot allocate new log...'' waits.
-
REM * Use ~100Kb per redo log file per connection to reduce checkpoints.
-
REM *
-
create database "oracle"
-
maxinstances 1
-
maxlogfiles 16
-
character set "US7ASCII"
-
datafile
-
'/usr/oracle/product/734/u0/oradata/oracle/system01.dbf' size 40M
-
logfile
-
'/usr/oracle/product/734/u0/oradata/oracle/redooracle01.log' size 500k,
-
'/usr/oracle/product/734/u1/oradata/oracle/redooracle02.log' size 500k,
-
'/usr/oracle/product/734/u2/oradata/oracle/redooracle03.log' size 500k;
-
-
disconnect
-
spool off
# vi $ORACLE_BASE/admin/oracle/create/crdb2oracle.sql
2.6 创建系统默认的数据库 oracle
2.6.1 创建默认的数据库
# svrmgrl
SVRMGRL> @/usr/oracle/admin/oracle/create/crdboracle.sql;
SVRMGRL> @@/usr/oracle/admin/oracle/create/crdb2oracle.sql;
2.6.2 建立数据字典(在 internal 用户下)
# svrmgrl
SVRMGRL> connect internal
SVRMGRL> @/usr/oracle/product/734/rdbms/admin/catalog.sql;
SVRMGRL> @/usr/oracle/product/734/rdbms/admin/catproc.sql;
2.6.3 修改用户密码(在 internal 用户下)
$ svrmgrl
SVRMGRL> connect internal;
SVRMGRL> select * from all_users;
SVRMGRL>
alter user [user_name] identified by [new_password] ;
注意:
1、这里的 user_name 代表你的用户名,new_password 代表你准备启用的新的用户密码。
2、将执行 select * from all_users 语句查出的用户全部做密码修改(这里我全部修改成了 oracle)。
2.6.4 建立默认的 profile 环境(以 system 用户)
$ svrmgrl
SVRMGRL> connect system
Password:
SVRMGRL> @/usr/oracle/product/734/sqlplus/admin/pupbld.sql
;
至此,我们的默认的数据库 oracle 已经建立完成了。
下面我们开始配置网络侦听并允许远程访问。
3、开启网络侦听
3.1 添加网络侦听控制文件 /etc/listener.ora 和 /etc/tnsnames.ora
# vi /etc/listener.ora
-
#
-
# Installation Generated NetV2 Configuration
-
# Version Date: Sep-30-97
-
# Filename: Tnsnames.ora
-
#
-
<oracle_sid> =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL= TCP)(Host= <host_name>)(Port= 1521))
-
(CONNECT_DATA = (SID = <oracle_sid>))
-
)
# vi /etc/tnsnames.ora
-
#
-
# Installation Generated Net V2 Configuration
-
# Version Date: Sep-16-97
-
# Filename: Listener.ora
-
#
-
LISTENER =
-
(ADDRESS_LIST =
-
(ADDRESS= (PROTOCOL= IPC)(KEY= <oracle_sid>))
-
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
-
(ADDRESS= (PROTOCOL= TCP)(Host= <host_name>)(Port= 1521))
-
)
-
SID_LIST_LISTENER =
-
(SID_LIST =
-
(SID_DESC =
-
(GLOBAL_DBNAME= <host_name>.)
-
(ORACLE_HOME= /usr/oracle/product/734)
-
(SID_NAME = <oracle_sid>)
-
)
-
)
-
STARTUP_WAIT_TIME_LISTENER = 0
-
CONNECT_TIMEOUT_LISTENER = 10
-
TRACE_LEVEL_LISTENER = OFF
根据你的实际情况,将上述两个文件中的 host_name 和 oracle_sid 修改成你的系统的实际内容,如本例中,我的 host_name 为 osr6orac , oracle_sid 为 oracle 。
3.2 启动侦听
$ svrmgrl
SVRMGRL> connect internal
SVRMGRL> startup
SVRMGRL> quit
$ lsncrt start
{BANNED}最佳后,给大家发一个福利吧,很多的朋友说没有 SCO OpenServer 5.0.7Hw 的安装 License ,这里给一个 5 用户的安装 Basic License 吧。
记住:不是增加用户的 License , 是系统安装时的基础 License Code 。
license number license code license date
=====================================================
3KF003776 gwncbfnz
阅读(1715) | 评论(0) | 转发(0) |