Chinaunix首页 | 论坛 | 博客
  • 博客访问: 205979
  • 博文数量: 75
  • 博客积分: 2049
  • 博客等级: 大尉
  • 技术积分: 780
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-08 12:37
文章分类

全部博文(75)

文章存档

2011年(1)

2010年(9)

2009年(65)

我的朋友

分类: LINUX

2009-08-25 17:47:43

1.    设置ORACLE_SID

# export ORACLE_SID=test


2.    创建相关目录

# mkdir –p $ORACLE_BASE/admin/test/adump

# mkdir –p $ORACLE_BASE/admin/test/bdump

# mkdir –p $ORACLE_BASE/admin/test/cdump

# mkdir –p $ORACLE_BASE/admin/test/udump

# mkdir –p $ORACLE_BASE/admin/test/pfile

# mkdir –p $ORACLE_BASE/oradata/test/


3.    创建参数文件$ORACLE_HOME/dbs/inittest.ora

test.__db_cache_size=83886080

test.__java_pool_size=4194304

test.__large_pool_size=4194304

test.__shared_pool_size=71303168

test.__streams_pool_size=0

*.audit_file_dest='/u01/admin/test/adump'

*.background_dump_dest='/u01/admin/test/bdump'

*.compatible='10.2.0.1.0'

*.control_files='/u01/oradata/test/control01.ctl','/u01/oradata/test/control02.ctl','/u01/oradata/test/control03.ctl'

*.core_dump_dest='/u01/admin/test/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='test'

*.db_recovery_file_dest='/u01/flash_recovery_area'

*.db_recovery_file_dest_size=2147483648

*.dispatchers='(PROTOCOL=TCP) (SERVICE=testXDB)'

*.job_queue_processes=10

*.log_archive_format='%t_%s_%r.dbf'

*.open_cursors=300

*.pga_aggregate_target=16777216

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=167772160

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/u01/admin/test/udump'

 

4.    创建密码文件

# orapwd file=$ORACLE_HOME/dbs/orapwtest password=admin entries=5 force=y


5.    创建oracle的建库脚本createdb.sql

create database test

MAXINSTANCES 1

MAXLOGHISTORY 1

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXDATAFILES 100

DATAFILE

'/u01/oradata/test/system01.dbf' size 100m reuse autoextend on next 1m maxsize unlimited extent management local

sysaux datafile

'/u01/oradata/test/sysaux01.dbf' size 100m reuse autoextend on next 1m maxsize unlimited

default temporary tablespace TEMP tempfile

'/u01/oradata/test/temp01.dbf' size 20m reuse autoextend on next 640k maxsize unlimited

undo tablespace UNDOTBS1 datafile

'/u01/oradata/test/undo01.dbf' size 20m reuse autoextend on next 5M maxsize unlimited

logfile

GROUP 1 ('/u01/oradata/test/redo1.dbf') size 10m,

GROUP 2 ('/u01/oradata/test/redo2.dbf') size 10m,

GROUP 3 ('/u01/oradata/test/redo3.dbf') size 10m

CHARACTER SET ZHS16GBK

NATIONAL CHARACTER SET AL16UTF16

;

 

SQL>alter database nomount;

SQL>@ createdb.sql;

 

6.    数据库创建完成后,再创建ORACLE的数据字典

SQL> @ ?/rdbms/admin/catalog.sql

SQL> @ ?/rdbms/admin/catproc.sql

SQL> @ ?/rdbms/admin/catexp.sql

 

阅读(991) | 评论(0) | 转发(0) |
0

上一篇:perl笔记

下一篇:oracle数据库SCN概念

给主人留下些什么吧!~~