RedHat Linux 5.3 下安装ORACLE 软件之后手动安装数据库脚本记录

$ORACLE_HOME/dbs/init.ora:

db_name = ezt
# first, specify the name of the databasedb_name=ezt
#for an ASM instance, use instance_type=ASM. Following is the default
instance_type=RDBMS
# you can set the db_name to your organization name as well
db_domain=world
# following two parameters set the max number of open files and processes
db_files=1000
processes=150
# following is the default block size
db_block_size=8192
# following is the default value for the statistics_level parameter
statistics_level=typical
# following is the default audit_trail value
audit_trail=none
# following three lines set the dump directory destinations
audit_file_dest='/usr/local/app/oracle/admin/ezt/adump/'
background_dump_dest='/usr/local/app/oracle/admin/ezt/bdump/'
user_dump_dest='/usr/local/app/oracle/admin/ezt/udump/'
core_dump_dest='/usr/local/app/oracle/admin/ezt/cdump/'
# following parameter sets the database compatibility level
compatible=10.2.0.1
# two control files are specified below
control_files = (/usr/local/app/oracle/ezt/control.001.dbf,
/usr/local/app/oracle/ezt/control.002.dbf,
/usr/local/app/oracle/ezt/control.003.dbf)
# cursor sharing is set to force, to make the database use bind variables
cursor_sharing=force
# following two parameters set the SGA and the PGA targets.
sga_target=140M
pga_aggregate_target=24M
# the multiblock read count is 16
db_file_multiblock_read_count=16
# the following will ensure that flashback logs
# are retained for 2 hours
db_flashback_retention_target=7200
# Following two parameters configure the optional flash recovery area
db_recovery_file_dest='/usr/local/app/oracle/flash_recovery_area'
db_recovery_file_dest_size=1000M
# Following two parameters control the archiving of the redo
# log files. For now, I am not archiving the logs, but these two parameters
# enable me to turn it on later.
log_archive_dest_1='LOCATION=/usr/local/app/oracle/arch/'
log_archive_format='log%t_%s_%r.arc'
# following is the default optimizer mode
optimizer_mode=all_rows
# the following line makes it necessary to use a password file to connect as SYSDBA
remote_login_passwordfile=EXCLUSIVE
#Following parameter allows certain operations to resume after a suspension
#resumbable_timeout=1800
# the following two parameters pertain to automatic undo management
undo_management=auto
undo_retention=7200
# The following is optional, since I'm using only a single undo tablespace
undo_tablespace=undotbs_01
job_queue_processes=10
open_cursors=300

结束

目录如下:

$ORACLE_BASE/admin/ezt/adump bdump cdump udump

$ORACLE_BASE/ezt/control.001.dbf  control.002.dbf  control.003.dbf

$ORACLE_BASE/oradata/ezt/redo01.log  redo02.log  redo03.log  sysaux01.dbf  system01.dbf  temp01.dbf  undotbs01.dbf

/home/oracle/Scripts/ezt.sql:

CREATE DATABASE ezt
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/usr/local/app/oracle/oradata/ezt/redo01.log') SIZE 10M reuse,
GROUP 2 ('/usr/local/app/oracle/oradata/ezt/redo02.log') SIZE 10M reuse,
GROUP 3 ('/usr/local/app/oracle/oradata/ezt/redo03.log') SIZE 10M reuse
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/usr/local/app/oracle/oradata/ezt/system01.dbf' SIZE 20M autoextend on next 1m maxsize unlimited
SYSAUX DATAFILE '/usr/local/app/oracle/oradata/ezt/sysaux01.dbf' SIZE 20m autoextend on next 1m maxsize unlimited
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/usr/local/app/oracle/oradata/ezt/temp01.dbf'
SIZE 20M extent management local uniform size 32k
UNDO TABLESPACE undotbs_01
DATAFILE '/usr/local/app/oracle/oradata/ezt/undotbs01.dbf'
SIZE 20M ;

遇到的问题:

CREATE DATABASE ezt
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

解决方法:检查跟踪文件$ORACLE_BASE/admin/ezt/bdump udump中文件的信息

我的跟踪文件中问题如下:

ORA-00604: error occurred at recursive SQL level 1
22 ORA-02236: invalid file name
23 Offending statement at line 6262
24 CREATE TABLESPACE TBS_1 DATAFILE SEGMENT SPACE MANAGEMENT MANUAL
25 ORA-01501: CREATE DATABASE failed
26 ORA-01519: error while processing file '?/rdbms/admin/sql.bsq' near line 6262
27 ORA-00604: error occurred at recursive SQL level 1
28 ORA-02236: invalid file name

是默认表空间TABLESPACE TBS_1的问题 在创建数据库脚本中将此语句删掉即解决问题。

posted @ 2012-09-05 23:09  totozlj  阅读(545)  评论(0编辑  收藏  举报