Chinaunix首页 | 论坛 | 博客
  • 博客访问: 823040
  • 博文数量: 137
  • 博客积分: 3477
  • 博客等级: 中校
  • 技术积分: 1409
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-30 21:53
文章分类

全部博文(137)

文章存档

2024年(8)

2023年(10)

2022年(4)

2021年(10)

2020年(9)

2018年(1)

2017年(1)

2014年(4)

2013年(3)

2012年(12)

2011年(24)

2010年(2)

2009年(8)

2008年(6)

2007年(34)

2006年(1)

分类: Oracle

2024-06-13 11:33:38

前言:
=======================================================
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、添加用户组、用户并设置环境变量。
# 添加用户和用户组

点击(此处)折叠或打开

  1. groupadd dba
  2. useradd -d /usr/oracle -g dba -s /usr/bin/bash -m oracle
  3. passwd oracle
# 设置环境变量(vi /usr/oracle/.bashrc)

点击(此处)折叠或打开

  1. ORACLE_BASE=/usr/oracle
  2. ORACLE_HOME=/usr/oracle/product/734
  3. ORACLE_SID=oracle
  4. ORACLE_TERM=ansi
  5. LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
  6. ORACLE_NLS32=$ORACLE_HOME/ocommon/nls/admin/data
  7. ORACLE_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/opt/bin:/usr/lbin:.
  8. ULIMIT=2297152
  9. TERM=ansi
  10. TMPDIR=/u/tmp
  11. PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/opt/bin:/usr/lbin:.
  12. export ORACLE_BASE ORACLE_HOME ORACLE_SID
  13. export ORACLE_TERM LD_LIBRARY_PATH
  14. export ORACLE_NLS32 ORACLE_PATH ULIMIT TERM TMPDIR PATH

2.2 创建数据挂载点

点击(此处)折叠或打开

  1. $ mkdir -p $ORACLE_HOME/u0/oradata/oracle
  2. $ mkdir -p $ORACLE_HOME/u0/oradata/oracle
  3. $ 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 。

点击(此处)折叠或打开

  1. # su - oracle
  2. $ cp oracle_734_osr6_bin.tar.gz /tmp
  3. $ cd /tmp
  4. $ gzip -d oracle_734_osr6_bin.tar.gz
  5. $ cd
  6. $ tar xvf /tmp/oracle_734_osr6_bin.tar

2.4 添加并修改初始化文件
# vi $ORACLE_BASE/admin/oracle/pfile/initoracle.ora

点击(此处)折叠或打开

  1. #
  2. # $Header: initx.orc 1.1 95/02/27 12:14:56 wyim Osd<unix> $ Copyr (c) 1992 Oracle
  3. #

  4. # include database configuration parameters
  5. ifile = /usr/oracle/product/admin/oracle/pfile/configoracle.ora

  6. rollback_segments = (r01,r02,r03,r04)

  7. ##############################################################################
  8. # Example INIT.ORA file
  9. #
  10. # This file is provided by Oracle Corporation to help you customize
  11. # your RDBMS installation for your site. Important system parameters
  12. # are discussed, and example settings given.
  13. #
  14. # Some parameter settings are generic to any size installation.
  15. # For parameters that require different values in different size
  16. # installations, three scenarios have been provided: SMALL, MEDIUM
  17. # and LARGE. Any parameter that needs to be tuned according to
  18. # installation size will have three settings, each one commented
  19. # according to installation size.
  20. #
  21. # Use the following table to approximate the SGA size needed for the
  22. # three scenarious provided in this file:
  23. #
  24. # -------Installation/Database Size------
  25. # SMALL MEDIUM LARGE
  26. # Block 2K 4500K 6800K 17000K
  27. # Size 4K 5500K 8800K 21000K
  28. #
  29. # To set up a database that multiple instances will be using, place
  30. # all instance-specific parameters in one file, and then have all
  31. # of these files point to a master file using the IFILE command.
  32. # This way, when you change a public
  33. # parameter, it will automatically change on all instances. This is
  34. # necessary, since all instances must run with the same value for many
  35. # parameters. For example, if you choose to use private rollback segments,
  36. # these must be specified in different files, but since all gc_*
  37. # parameters must be the same on all instances, they should be in one file.
  38. #
  39. # INSTRUCTIONS: Edit this file and the other INIT files it calls for
  40. # your site, either by using the values provided here or by providing
  41. # your own. Then place an IFILE= line into each instance-specific
  42. # INIT file that points at this file.
  43. ###############################################################################

  44. # tuning parameters

  45. db_files = 20

  46. # db_file_multiblock_read_count = 8 # SMALL
  47. # db_file_multiblock_read_count = 16 # MEDIUM
  48. db_file_multiblock_read_count = 32 # LARGE

  49. # db_block_buffers = 200 # SMALL
  50. # db_block_buffers = 550 # MEDIUM
  51. db_block_buffers = 3200 # LARGE

  52. # shared_pool_size = 3500000 # SMALL
  53. # shared_pool_size = 6000000 # MEDIUM
  54. shared_pool_size = 9000000 # LARGE

  55. log_checkpoint_interval = 10000

  56. processes = 50 # SMALL
  57. # processes = 100 # MEDIUM
  58. # processes = 200 # LARGE

  59. # dml_locks = 100 # SMALL
  60. # dml_locks = 200 # MEDIUM
  61. dml_locks = 500 # LARGE

  62. # log_buffer = 8192 # SMALL
  63. # log_buffer = 32768 # MEDIUM
  64. log_buffer = 163840 # LARGE

  65. # sequence_cache_entries = 10 # SMALL
  66. # sequence_cache_entries = 30 # MEDIUM
  67. sequence_cache_entries = 100 # LARGE

  68. # sequence_cache_hash_buckets = 10 # SMALL
  69. # sequence_cache_hash_buckets = 23 # MEDIUM
  70. sequence_cache_hash_buckets = 89 # LARGE

  71. # audit_trail = true # if you want auditing
  72. # timed_statistics = true # if you want timed statistics
  73. max_dump_file_size = 10240 # limit trace file size to 5 Meg each

  74. # log_archive_start = true # if you want automatic archiving

  75.  compatible = 7.3.0.0
  76.  global_names = TRUE

  77. mts_dispatchers="ipc,1"
  78. mts_max_dispatchers=10
  79. mts_servers=1
  80. mts_max_servers=10
  81. mts_service=oracle
  82. mts_listener_address="(ADDRESS=(PROTOCOL=ipc)(KEY=oracle))"
# vi $ORACLE_BASE/admin/oracle/pfile/initoracle_0.ora

点击(此处)折叠或打开

  1. #
  2. # $Header: initx.orc 1.1 95/02/27 12:14:56 wyim Osd<unix> $ Copyr (c) 1992 Oracle
  3. #

  4. # include database configuration parameters
  5. ifile = /usr/oracle/product/admin/oracle/pfile/configoracle.ora

  6. rollback_segments = ()

  7. ##############################################################################
  8. # Example INIT.ORA file
  9. #
  10. # This file is provided by Oracle Corporation to help you customize
  11. # your RDBMS installation for your site. Important system parameters
  12. # are discussed, and example settings given.
  13. #
  14. # Some parameter settings are generic to any size installation.
  15. # For parameters that require different values in different size
  16. # installations, three scenarios have been provided: SMALL, MEDIUM
  17. # and LARGE. Any parameter that needs to be tuned according to
  18. # installation size will have three settings, each one commented
  19. # according to installation size.
  20. #
  21. # Use the following table to approximate the SGA size needed for the
  22. # three scenarious provided in this file:
  23. #
  24. # -------Installation/Database Size------
  25. # SMALL MEDIUM LARGE
  26. # Block 2K 4500K 6800K 17000K
  27. # Size 4K 5500K 8800K 21000K
  28. #
  29. # To set up a database that multiple instances will be using, place
  30. # all instance-specific parameters in one file, and then have all
  31. # of these files point to a master file using the IFILE command.
  32. # This way, when you change a public
  33. # parameter, it will automatically change on all instances. This is
  34. # necessary, since all instances must run with the same value for many
  35. # parameters. For example, if you choose to use private rollback segments,
  36. # these must be specified in different files, but since all gc_*
  37. # parameters must be the same on all instances, they should be in one file.
  38. #
  39. # INSTRUCTIONS: Edit this file and the other INIT files it calls for
  40. # your site, either by using the values provided here or by providing
  41. # your own. Then place an IFILE= line into each instance-specific
  42. # INIT file that points at this file.
  43. ###############################################################################

  44. # tuning parameters

  45. db_files = 20

  46. # db_file_multiblock_read_count = 8 # SMALL
  47. # db_file_multiblock_read_count = 16 # MEDIUM
  48. db_file_multiblock_read_count = 32 # LARGE

  49. # db_block_buffers = 200 # SMALL
  50. # db_block_buffers = 550 # MEDIUM
  51. db_block_buffers = 3200 # LARGE

  52. # shared_pool_size = 3500000 # SMALL
  53. # shared_pool_size = 6000000 # MEDIUM
  54. shared_pool_size = 9000000 # LARGE

  55. log_checkpoint_interval = 10000

  56. processes = 50 # SMALL
  57. # processes = 100 # MEDIUM
  58. # processes = 200 # LARGE

  59. # dml_locks = 100 # SMALL
  60. # dml_locks = 200 # MEDIUM
  61. dml_locks = 500 # LARGE
  62. # log_buffer = 8192 # SMALL
  63. # log_buffer = 32768 # MEDIUM
  64. log_buffer = 163840 # LARGE

  65. # sequence_cache_entries = 10 # SMALL
  66. # sequence_cache_entries = 30 # MEDIUM
  67. sequence_cache_entries = 100 # LARGE

  68. # sequence_cache_hash_buckets = 10 # SMALL
  69. # sequence_cache_hash_buckets = 23 # MEDIUM
  70. sequence_cache_hash_buckets = 89 # LARGE

  71. # audit_trail = true # if you want auditing
  72. # timed_statistics = true # if you want timed statistics
  73. max_dump_file_size = 10240 # limit trace file size to 5 Meg each

  74. # log_archive_start = true # if you want automatic archiving

  75.  compatible = 7.3.0.0
  76.  global_names = TRUE

  77. mts_dispatchers="ipc,1"
  78. mts_max_dispatchers=10
  79. mts_servers=1
  80. mts_max_servers=10
  81. mts_service=oracle
  82. mts_listener_address="(ADDRESS=(PROTOCOL=ipc)(KEY=oracle))"
# vi $ORACLE_BASE/admin/oracle/pfile/configoracle.ora

点击(此处)折叠或打开

  1. #
  2. # $Header: cnfg.orc 1.1 95/02/27 12:14:25 wyim Osd<unix> $ Copyr (c) 1992 Oracle
  3. #
  4. # cnfg.ora - instance configuration parameters

  5. control_files = (/usr/oracle/product/734/u0/oradata/oracle/control01.ctl,
  6.                            /usr/oracle/product/734/u1/oradata/oracle/control02.ctl,
  7.                            /usr/oracle/product/734/u2/oradata/oracle/control03.ctl)
  8. # Below for possible future use...
  9. #init_sql_files = (?/dbs/sql.bsq,
  10. # ?/rdbms/admin/catalog.sql,
  11. # ?/rdbms/admin/expvew.sql)
  12. background_dump_dest = /usr/oracle/product/admin/oracle/bdump
  13. core_dump_dest = /usr/oracle/product/admin/oracle/cdump
  14. user_dump_dest = /usr/oracle/product/admin/oracle/udump
  15. #log_archive_dest = /usr/oracle/product/admin/oracle/arch/arch.log
  16. #db_block_size = <blocksize>

  17. db_name = oracle
# vi $ORACLE_BASE/product/734/dbs/init.ora

点击(此处)折叠或打开

  1. #
  2. # $Header: init.ora 19-aug-97.14:46:18 hpiao Exp $
  3. #
  4. # Copyright (c) 1991, 1997 by Oracle Corporation
  5. # NAME
  6. # init.ora
  7. # FUNCTION
  8. # NOTES
  9. # MODIFIED
  10. # hpiao 08/19/97 - merge from 733
  11. # hpiao 08/19/97 -
  12. # alingelb 09/19/94 - remove vms-specific stuff
  13. # dpawson 07/07/93 - add more comments regarded archive start
  14. # maporter 10/29/92 - Add vms_sga_use_gblpagfile=TRUE
  15. # jloaiza 03/07/92 - change ALPHA to BETA
  16. # danderso 02/26/92 - change db_block_cache_protect to _db_block_cache_p
  17. # ghallmar 02/03/92 - db_directory -> db_domain
  18. # maporter 01/12/92 - merge changes from branch 1.8.308.1
  19. # maporter 12/21/91 - bug 76493: Add control_files parameter
  20. # wbridge 12/03/91 - use of %c in archive format is discouraged
  21. # ghallmar 12/02/91 - add global_names=true, db_directory=us.acme.com
  22. # thayes 11/27/91 - Change default for cache_clone
  23. # jloaiza 08/13/91 - merge changes from branch 1.7.100.1
  24. # jloaiza 07/31/91 - add debug stuff
  25. # rlim 04/29/91 - removal of char_is_varchar2
  26. # Bridge 03/12/91 - log_allocation no longer exists
  27. # Wijaya 02/05/91 - remove obsolete parameters
  28. #
  29. ##############################################################################
  30. # Example INIT.ORA file
  31. #
  32. # This file is provided by Oracle Corporation to help you customize
  33. # your RDBMS installation for your site. Important system parameters
  34. # are discussed, and example settings given.
  35. #
  36. # Some parameter settings are generic to any size installation.
  37. # For parameters that require different values in different size
  38. # installations, three scenarios have been provided: SMALL, MEDIUM
  39. # and LARGE. Any parameter that needs to be tuned according to
  40. # installation size will have three settings, each one commented
  41. # according to installation size.
  42. #
  43. # Use the following table to approximate the SGA size needed for the
  44. # three scenarious provided in this file:
  45. #
  46. # -------Installation/Database Size------
  47. # SMALL MEDIUM LARGE
  48. # Block 2K 4500K 6800K 17000K
  49. # Size 4K 5500K 8800K 21000K
  50. #
  51. # To set up a database that multiple instances will be using, place
  52. # all instance-specific parameters in one file, and then have all
  53. # of these files point to a master file using the IFILE command.
  54. # This way, when you change a public
  55. # parameter, it will automatically change on all instances. This is
  56. # necessary, since all instances must run with the same value for many
  57. # parameters. For example, if you choose to use private rollback segments,
  58. # these must be specified in different files, but since all gc_*
  59. # parameters must be the same on all instances, they should be in one file.
  60. #
  61. # INSTRUCTIONS: Edit this file and the other INIT files it calls for
  62. # your site, either by using the values provided here or by providing
  63. # your own. Then place an IFILE= line into each instance-specific
  64. # INIT file that points at this file.
  65. ###############################################################################
  66. db_name = DEFAULT

  67. db_file_multiblock_read_count = 8 # SMALL
  68. # db_file_multiblock_read_count = 16 # MEDIUM
  69. # db_file_multiblock_read_count = 32 # LARGE

  70. db_block_buffers = 60 # SMALL
  71. # db_block_buffers = 550 # MEDIUM
  72. # db_block_buffers = 3200 # LARGE

  73. shared_pool_size = 3500000 # SMALL
  74. # shared_pool_size = 5000000 # MEDIUM
  75. # shared_pool_size = 9000000 # LARGE

  76. log_checkpoint_interval = 10000

  77. processes = 50 # SMALL
  78. # processes = 100 # MEDIUM
  79. # processes = 200 # LARGE

  80. dml_locks = 100 # SMALL
  81. # dml_locks = 200 # MEDIUM
  82. # dml_locks = 500 # LARGE

  83. log_buffer = 8192 # SMALL
  84. # log_buffer = 32768 # MEDIUM
  85. # log_buffer = 163840 # LARGE

  86. sequence_cache_entries = 10 # SMALL
  87. # sequence_cache_entries = 30 # MEDIUM
  88. # sequence_cache_entries = 100 # LARGE

  89. sequence_cache_hash_buckets = 10 # SMALL
  90. # sequence_cache_hash_buckets = 23 # MEDIUM
  91. # sequence_cache_hash_buckets = 89 # LARGE

  92. # audit_trail = true # if you want auditing
  93. # timed_statistics = true # if you want timed statistics
  94. max_dump_file_size = 10240 # limit trace file size to 5 Meg each

  95. # Uncommenting the line below will cause automatic archiving if archiving has
  96. # been enabled using ALTER DATABASE ARCHIVELOG.
  97. # log_archive_start = true
  98. # log_archive_dest = disk$rdbms:[oracle.archive]
  99. # log_archive_format = "T%TS%S.ARC"

  100. # If using private rollback segments, place lines of the following
  101. # form in each of your instance-specific init.ora files:
  102. # rollback_segments = (name1, name2)

  103. # If using public rollback segments, define how many
  104. # rollback segments each instance will pick up, using the formula
  105. # # of rollback segments = transactions / transactions_per_rollback_segment
  106. # In this example each instance will grab 40/10 = 4:
  107. # transactions = 40
  108. # transactions_per_rollback_segment = 10

  109. # Global Naming -- enforce that a dblink has same name as the db it connects to
  110. global_names = TRUE

  111. # Edit and uncomment the following line to provide the suffix that will be
  112. # appended to the db_name parameter (separated with a dot) and stored as the
  113. # global database name when a database is created. If your site uses
  114. # Internet Domain names for e-mail, then the part of your e-mail address after
  115. # the '@' is a good candidate for this parameter value.

  116. # db_domain = us.acme.com # global database name is db_name.db_domain

  117. # FOR DEVELOPMENT ONLY, DEFAULT TO SINGLE-PROCESS
  118. # single_process = TRUE

  119. # FOR DEVELOPMENT ONLY, ALWAYS TRY TO USE SYSTEM BACKING STORE
  120. # vms_sga_use_gblpagfil = TRUE

  121. # FOR BETA RELEASE ONLY. Enable debugging modes. Note that these can
  122. # adversely affect performance. On some non-VMS ports the db_block_cache_*
  123. # debugging modes have a severe effect on performance.

  124. _db_block_cache_protect = true # memory protect buffers
  125. event = "10210 trace name context forever, level 2" # data block checking
  126. event = "10211 trace name context forever, level 2" # index block checking
  127. event = "10235 trace name context forever, level 1" # memory heap checking
  128. event = "10049 trace name context forever, level 2" # memory protect cursors


  129. # define parallel server (multi-instance) parameters
  130. #ifile = ora_system:initps.ora

  131. # define two control files by default
  132. 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

点击(此处)折叠或打开

  1. REM * Set terminal output and command echoing on; log output of this script.
  2. REM *
  3. #set termout on
  4. #set echo on
  5. spool /usr/oracle/admin/oracle/create/crdboracle.lst

  6. REM * Start the <sid> instance (ORACLE_SID here must be set to <sid>).
  7. REM *
  8. connect internal
  9. startup nomount pfile=/usr/oracle/admin/oracle/pfile/initoracle_0.ora

  10. REM * Create the <dbname> database.
  11. REM * SYSTEM tablespace configuration guidelines:
  12. REM * General-Purpose ORACLE RDBMS 5Mb
  13. REM * Additional dictionary for applications 10-50Mb
  14. REM * Redo Log File configuration guidelines:
  15. REM * Use 3+ redo log files to relieve ``cannot allocate new log...'' waits.
  16. REM * Use ~100Kb per redo log file per connection to reduce checkpoints.
  17. REM *
  18. create database "oracle"
  19.     maxinstances 1
  20.     maxlogfiles 16
  21.     character set "US7ASCII"
  22.     datafile
  23.         '/usr/oracle/product/734/u0/oradata/oracle/system01.dbf' size 40M
  24.     logfile
  25.         '/usr/oracle/product/734/u0/oradata/oracle/redooracle01.log' size 500k,
  26.         '/usr/oracle/product/734/u1/oradata/oracle/redooracle02.log' size 500k,
  27.         '/usr/oracle/product/734/u2/oradata/oracle/redooracle03.log' size 500k;

  28. disconnect
  29. spool off
# vi $ORACLE_BASE/admin/oracle/create/crdb2oracle.sql

点击(此处)折叠或打开

  1. REM * This script takes care off all commands necessary to create
  2. REM * an OFA compliant database after the CREATE DATABASE command has
  3. REM * succeeded.

  4. REM * Set terminal output and command echoing on; log output of this script.
  5. REM *
  6. #set termout on
  7. #set echo on
  8. #spool 2-rdbms.lst

  9. REM * The database should already be started up at this point with:
  10. REM * pfile=/usr/oracle/admin/oracle/pfile/initoracle_0.ora

  11. connect internal

  12. REM # install data dictionary views:
  13. @/usr/oracle/product/734/rdbms/admin/catalog.sql

  14. REM * Create additional rollback segment in SYSTEM before creating tablespace.
  15. REM *
  16. connect internal
  17. create rollback segment r0 tablespace system
  18. storage (initial 16k next 16k minextents 2 maxextents 20);

  19. REM * Use ALTER ROLLBACK SEGMENT ONLINE to put r0 online without shutting
  20. REM * down and restarting the database.
  21. REM *
  22. alter rollback segment r0 online;

  23. REM * Create a tablespace for rollback segments.
  24. REM * Rollback segment configuration guidelines:
  25. REM * 1 rollback segments for every 4 concurrent xactions.
  26. REM * No more than 50 rollback segments.
  27. REM * All rollback segments the same size.
  28. REM * Between 2 and 4 homogeneously-sized extents per rollback segment.
  29. REM * Attempt to keep rollback segments to 4 extents.
  30. REM *
  31. create tablespace rbs datafile
  32.         '/usr/oracle/product/734/u0/oradata/oracle/rbs01.dbf' size 25M
  33. default storage (
  34.         initial 128k
  35.         next 128k
  36.         pctincrease 0
  37.         minextents 2
  38. );

  39. REM * Create a tablespace for temporary segments.
  40. REM * Temporary tablespace configuration guidelines:
  41. REM * Initial and next extent sizes = k * SORT_AREA_SIZE, k in {1,2,3,...}.
  42. REM *
  43. create tablespace temp datafile
  44.         '/usr/oracle/product/734/u0/oradata/oracle/temp01.dbf' size 550k
  45. default storage (
  46.         initial 256k
  47.         next 256k
  48.         pctincrease 0
  49. );

  50. REM * Create a tablespace for database tools.
  51. REM *
  52. create tablespace tools datafile
  53.         '/usr/oracle/product/734/u0/oradata/oracle/tools01.dbf' size 15M;

  54. REM * Create a tablespace for miscellaneous database user activity.
  55. REM *
  56. create tablespace users datafile
  57.         '/usr/oracle/product/734/u0/oradata/oracle/users01.dbf' size 1M;

  58. REM * Create rollback segments.
  59. REM *
  60. create rollback segment r01 tablespace rbs;
  61. create rollback segment r02 tablespace rbs;
  62. create rollback segment r03 tablespace rbs;
  63. create rollback segment r04 tablespace rbs;

  64. REM * Use ALTER ROLLBACK SEGMENT ONLINE to put rollback segments online
  65. REM * without shutting down and restarting the database. Only put one
  66. REM * of the rollback segments online at this time so that it will always
  67. REM * be the one used. When the user shuts down the database and starts
  68. REM * it up with initSID.ora, all four will be brought online.
  69. REM *
  70. alter rollback segment r01 online;
  71. REM * alter rollback segment r02 online;
  72. REM * alter rollback segment r03 online;
  73. REM * alter rollback segment r04 online;

  74. REM * Since we've created and brought online 2 more rollback segments,
  75. REM * we no longer need the second rollback segment in the SYSTEM tablespace.
  76. alter rollback segment r0 offline;
  77. drop rollback segment r0;

  78. REM * Alter SYS and SYSTEM users.
  79. REM *
  80. alter user sys temporary tablespace temp;
  81. #revoke resource from system;
  82. #revoke resource on system from system;
  83. #grant resource on tools to system;
  84. alter user system default tablespace tools temporary tablespace temp;

  85. REM * For each DBA user, run DBA synonyms SQL script. Don't forget that EACH
  86. REM * DBA USER created in the future needs dba_syn.sql run from its account.
  87. REM *
  88. connect system/manager
  89. @/usr/oracle/product/734/rdbms/admin/catdbsyn.sql

  90. spool off

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

点击(此处)折叠或打开

  1. #
  2. # Installation Generated NetV2 Configuration
  3. # Version Date: Sep-30-97
  4. # Filename: Tnsnames.ora
  5. #
  6. <oracle_sid> =
  7.   (DESCRIPTION =
  8.     (ADDRESS = (PROTOCOL= TCP)(Host= <host_name>)(Port= 1521))
  9.     (CONNECT_DATA = (SID = <oracle_sid>))
  10.   )
# vi /etc/tnsnames.ora

点击(此处)折叠或打开

  1. #
  2. # Installation Generated Net V2 Configuration
  3. # Version Date: Sep-16-97
  4. # Filename: Listener.ora
  5. #
  6. LISTENER =
  7.   (ADDRESS_LIST =
  8.         (ADDRESS= (PROTOCOL= IPC)(KEY= <oracle_sid>))
  9.         (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
  10.         (ADDRESS= (PROTOCOL= TCP)(Host= <host_name>)(Port= 1521))
  11.   )
  12. SID_LIST_LISTENER =
  13.   (SID_LIST =
  14.     (SID_DESC =
  15.       (GLOBAL_DBNAME= <host_name>.)
  16.       (ORACLE_HOME= /usr/oracle/product/734)
  17.       (SID_NAME = <oracle_sid>)
  18.     )
  19.   )
  20. STARTUP_WAIT_TIME_LISTENER = 0
  21. CONNECT_TIMEOUT_LISTENER = 10
  22. 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         
阅读(1404) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~