创建数据库脚本出现Ora-01501错误
---book.sql
Create database book datafile 'E:\oracle\product\10.2.0\oradata\book\system01.dbf' size 300M reuse
autoextend on next 10240K maxsize unlimited extent management local sysaux
datafile 'E:\oracle\product\10.2.0\oradata\book\sysaux01.dbf' size 120M reuse autoextend on next 10240K
maxsize unlimited default temporary tablespace temp tempfile
'E:\oracle\product\10.2.0\oradata\book\temp01.dbf' size 20M reuse autoextend on next 640K maxsize unlimited undo tablespace "UNDOTBS1"
datafile 'E:\oracle\product\10.2.0\oradata\book\UNDOTBS1.dbf' size 200M reuse autoextend on next 5120K
maxsize unlimited logfile
group 1 ('E:\oracle\product\10.2.0\oradata\book\redo01.log') size 10240K,
group 2 ('E:\oracle\product\10.2.0\oradata\book\redo02.log') size 10240K,
group 3 ('E:\oracle\product\10.2.0\oradata\book\redo03.log') size 10240K
---
然后执行SQL>start E:\book.sql 系统报错:
~~~~~~~~~~~~~~~~~~~~
SQL> start E:\book.sql;
11 ;
Create database book datafile 'E:\oracle\product\10.2.0\oradata\book\system01.db
f' size 300M reuse
*
第 1 行出现错误:
ORA-01501: CREATE DATABASE ??
ORA-01504: ???? 'BOOK' ??? db_name 'orcl2' ???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------解决方案--------------------你这个语法错误吧。
参考一下:
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG' SIZE 50M,
GROUP 2 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG' SIZE 50M,
GROUP 3 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\GXEPTS.DBF',
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\GXCBM.DBF'
CHARACTER SET ZHS16GBK
;
------解决方案--------------------语法错了吧,datafile的语法里有reuse么?
------解决方案--------------------你是创建表空间还是数据库啊?