静默方式安装10g数据库软件+升级patch+手工建库(八)

2015-02-03 03:52:09 · 作者: · 浏览: 78
leprod.ora [oracle@prod dbs]$ cat alert_prod.log The value of parameter db_block_buffers is below the required minimum The new value is ((4MB * the number of cpus)/db_block_size) Fri Aug 29 21:23:08 CST 2014 Cannot set sga_target with db_block_buffers set

原来是db_block_buffers = 100设置得太小了,根据公式应该=512000,但重启后依然无效。
查阅官方资料得知,SGA_TARGET > 0 不能与db_block_buffer这个过时的参数共存,否则就会出现ORA-00824错误。那么现在把该参数去掉后重新创建spfile,并启动到nomount即可

SQL> create spfile from pfile;
File created.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 524288000 bytes
Fixed Size 1274668 bytes
Variable Size 146803924 bytes
Database Buffers 373293056 bytes
Redo Buffers 2916352 bytes
SQL>

--编辑创建数据库语句
[oracle@prod scripts]$ touch createprod.sql
[oracle@prod scripts]$ vi createprod.sql
CREATE DATABASE prod
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/prod/redo01a.log','/u01/app/oracle/oradata/prod/redo01b.log') SIZE 50M,
GROUP 2 ('/u01/app/oracle/oradata/prod/redo02a.log','/u01/app/oracle/oradata/prod/redo02b.log') SIZE 50M,
GROUP 3 ('/u01/app/oracle/oradata/prod/redo03a.log','/u01/app/oracle/oradata/prod/redo03b.log') SIZE 50M
MAXLOGFILES 200
MAXLOGMEMBERS 5
MAXLOGHISTORY 200
MAXDATAFILES 100
MAXINSTANCES 2
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/u01/app/oracle/oradata/prod/system01.dbf' SIZE 300M REUSE
'/u01/app/oracle/oradata/prod/user01.dbf' SIZE 100M REUSE
'/u01/app/oracle/oradata/prod/example01.dbf' SIZE 100M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u01/app/oracle/oradata/prod/sysaux01.dbf' SIZE 300M REUSE
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '/u01/app/oracle/oradata/prod/temp01.dbf' SIZE 100M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/prod/undotbs01.dbf' SIZE 100M REUSE AUTOEXTEND ON MAXSIZE 2G;

--执行语句创建脚本
[oracle@prod ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 29 21:56:55 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
@createprod.sql CREATE DATABASE prod * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced 建库脚本遭遇错误,实例被终止了 SQL> exit [oracle@prod ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Fri Aug 29 22:01:06 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 524288000 bytes Fixed Size 1274668 bytes Variable Size 146803924 bytes Database Buffers 373293056 bytes Redo Buffers 2916352 bytes ORA-01079: ORACLE database was not properly created, operation aborted SQL> !oerr ora 1079 01079, 00000, "ORACLE database was not properly created, operation aborted" // *Cause: There was an error when the database or control file was created. // *Action: Check what error was signaled when the database was first // created or when the control file was recreated. Take appropriate // actions to recreate the database or a new control file. SQL>

提示需要重建数据库或控制文件,如果要重建控制文件,也没办法用备份控制文件到trace的方法来获得创建脚本,只能手动添加控制文件需要的内容,因为现在还是在