日期:2014-05-17  浏览次数:20935 次

sql*plus 创建数据库求检查
initTEST.ora
SQL code

*.audit_file_dest='/test/admin/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files=('/test/oradata/control01.ctl','/test/oradata/control02.ctl')
*.db_block_size=8192
*.db_domain='yongyy.com'
*.db_name='TEST'
*.db_recovery_file_dest='/yongyy/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=1356857344
*.diagnostic_dest='/test/diagnostic'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=TESTXDB)'
*.log_archive_dest_1=''
*.memory_target=467664896
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'



建库脚本:
SQL code

create database "TEST"
----------------------
maxinstances 8
maxloghistory 1
maxlogfiles 16
maxlogmembers 5
maxdatafiles 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
-----------------------
--logfile
logfile
group 1 ('/test/redo/redo_a_01.rdo','/test/redo/redo_a_02.rdo') size 51200K,
group 2 ('/test/redo/redo_b_01.rdo','/test/redo/redo_b_02.rdo') size 50m
------- datafile ------
extent management local
datafile
  '/test/oradata/system01.dbf'  size 670M,
  '/test/oradata/users01.dbf'   size 40M,
--'/test/oradata/undotbs01.dbf' size  25M,
  '/test/oradata/spaces.dbf'  size 30M
---------
  default tablespace defaultspace datafile '/test/oradata/default01.dbf' size 25M reuse
  default temporary tablespace    temp tempfile '/test/oradata/temp01.dbf'  size 35M
  SYSAUX datafile '/test/oradata/sysaux001.dbf' size 440M
  undo tablespace UNDOTBS1 datafile  '/test/oradata/undotbs01.dbf' size 30M;
--------------------------
--CHARACTER SET AL32UTF8
--NATIONAL CHARACTER SET AL16UTF16
--------------------------




在 trace/alert.log中:

SQL code

Completed: create database "TEST"
----------------------
maxinstances 8
maxloghistory 1
maxlogfiles 16
maxlogmembers 5
maxdatafiles 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
-----------------------
--logfile
logfile
group 1 ('/test/redo/redo_a_01.rdo','/test/redo/redo_a_02.rdo') size 51200K,
group 2 ('/test/redo/redo_b_01.rdo','/test/redo/redo_b_02.rdo') size 50m
------- datafile ------
extent management local
datafile
  '/test/oradata/system01.dbf'  size 670M,
  '/test/oradata/users01.dbf'   size 40M,
--'/test/oradata/undotbs01.dbf' size  25M,
  '/test/oradata/spaces.dbf'  size 30M
---------
  default tablespace defaultspace datafile '/test/oradata/default01.dbf' size 25M reuse
  default temporary tablespace    temp tempfile '/test/oradata/temp01.dbf'  size 35M
  SYSAUX datafile '/test/oradata/sysaux001.dbf' size 440M
  undo tablespace UNDOTBS1 datafile  '/test/oradata/undotbs01.dbf' size 30M
Mon Dec 05 08:03:34 2011
db_recovery_file_dest_size of 1294 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.



查看监听:
Service "TEST.yongyy.com" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
Service "TESTXDB.yongyy.com" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
The command completed successfully

执行建库脚本后提示:
SQL> create database "TEST"
*
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-01100: database already mounted
------------------------------
是那个地方出错了?

---