系统环境:
1、操作系统:Windows 2000 Pro
2、数据库: Oracle9I Release 9.2.0.3.0
3、安装路径:D:/ORACLE
建库步骤:
1、手工创建相关目录
D:/Oracle/admin/ora92
D:/Oracle/admin/ora92/adhoc
D:/Oracle/admin/ora92/bdump
D:/Oracle/admin/ora92/cdump
D:/Oracle/admin/ora92/create
D:/Oracle/admin/ora92/exp
D:/Oracle/admin/ora92/pfile
D:/Oracle/admin/ora92/udump
D:/Oracle/oradata/ora92
D:/Oracle/oradata/ora92/archive
------------------------------------
这几步比较简单,很快就完成了。觉得手动创建数据库对理解结构还是很有帮助的。
2、手工创建初始化启动参数文件:D:/Oracle/admin/ora92/pfile/initora92.ora,内容:
--------------------------------------------------------------------------
###################################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
###################################
# MTS
dispatchers="(PROTOCOL=TCP) (SERVICE=ora9iXDB)"
# Optimizer
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
# Job Queues
job_queue_processes=10
# Instance Identification
instance_name=ora9i
# Miscellaneous
aq_tm_processes=1
compatible=9.2.0.0.0
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=524288
# Database Identification
db_domain=""
db_name=ora92
# File Configuration
control_files=("D:/oracle/oradata/ora92/control01.ctl",
"D:/oracle/oradata/ora92/control02.ctl",
"D:/oracle/oradata/ora92/control03.ctl")
# Pools
java_pool_size=33554432
large_pool_size=8388608
shared_pool_size=50331648
# Cursors and Library Cache
open_cursors=300
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_retention=600
undo_tablespace=UNDOTBS1
# Diagnostics and Statistics
background_dump_dest=D:/oracle/admin/ora92/bdump
core_dump_dest=D:/oracle/admin/ora92/cdump
timed_statistics=TRUE
user_dump_dest=D:/oracle/admin/ora92/udump
# Processes and Sessions
processes=150
# Redo Log and Recovery
fast_start_mttr_target=300
# Cache and I/O
db_block_size=4096
db_cache_size=25165824
db_file_multiblock_read_count=16
--------------------------------------------------------------------------
3、手工创建D:/Oracle/Ora92/DATABASE/initora92.ora文件,
内容:IFILE='D:/Oracle/admin/ora92/pfile/initora92.ora'
4、使用orapwd.exe命令,创建D:/Oracle/Ora92/DATABASE/PWDora92.ora
命令:D:/Oracle/Ora92/bin/orapwd file=D:/Oracle/Ora92/DATABASE/PWDora92.ora
password=lovehoney entries=5
5、通过oradim.exe命令,在服务里生成一个新的实例管理服务,启动方式为手工
在注册表中添加HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0 添加字串值"ORACLE_SID"="ora92"(这个很
重要,否则出现ORA-12560错误)
也可以set ORACLE_SID=ora92
D:/Oracle/Ora92/bin/oradim -new -sid ora92 -startmode manual -pfile
"D:/Oracle/admin/ora92/pfile/initora92.ora"
6、生成各种数据库对象
D:/>Oracle/Ora92/bin/sqlplus /nolog
Conn SYS/lovehoney as SYSDBA
--创建数据库
startup nomount pfile="D:/Oracle/admin/ora92/pfile/initora92.ora"
CREATE DATABASE ora92
LOGFILE 'D:/Oracle/oradata/ora92/redo01.log' SIZE 2048K,
'D:/Oracle/oradata/ora92/redo02.log' SIZE 2048K,
'D:/Oracle/oradata/ora92/redo03.log' SIZE 2048K
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXLOGHISTORY 1
DATAFILE 'D:/Oracle/oradata/ora92/system01.dbf' SIZE 58M REUSE AUTOEXTEND ON NEXT 640K
MAXDATAFILES 254
MAXINSTANCES 1
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET ZHS16GBK;
控制文件、日志文件在上面语句执行时生成