手动创建一个Oracle数据库

系统环境:
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;

控制文件、日志文件在上面语句执行时生成

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值