从sqlplus / as sysdba创建数据库

时间:2019-05-14 08:34:39

标签: oracle oracle10g

我正在使用CentO和Oracle 10 XE。

我以sqlplus / sysdba的身份启动数据库 我想从脚本创建数据库名称XE有人可以帮忙吗?

CREATE DATABASE XE
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/usr/lib/oracle/xe/oradata/XE/log/redo01.log') SIZE 100M,
GROUP 2 ('/usr/lib/oracle/xe/oradata/XE/log/redo02.log') SIZE 100M,
GROUP 3 ('/usr/lib/oracle/xe/oradata/XE/log/redo03.log') SIZE 100M
DATAFILE '/usr/lib/oracle/xe/oradata/XE/system01.dbf' SIZE 325M REUSE
SYSAUX DATAFILE '/usr/lib/oracle/xe/oradata/XE/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE tbs_1
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/usr/lib/oracle/xe/oradata/XE/temp01.dbf'
SIZE 20M REUSE;

然后出现以下错误:

Completed: ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMPTS1
Tue May 14 09:54:06 2019
Errors in file /usr/lib/oracle/xe/app/oracle/admin/XE/udump/xe_ora_17320.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02236: invalid file name
Tue May 14 09:54:06 2019
Errors in file /usr/lib/oracle/xe/app/oracle/admin/XE/udump/xe_ora_17320.trc:
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '?/rdbms/admin/sql.bsq' near line 6262
ORA-00604: error occurred at recursive SQL level 1
ORA-02236: invalid file name
Error 1519 happened during db open, shutting down database

1 个答案:

答案 0 :(得分:1)

我可能错了,但是:当您使用Oracle 10g Express Edition(XE)时,您-宁愿停止做您正在做的事情。在XE中无法创建多个数据库(并且该数据库已经在安装过程中创建)。

如果您想练习有关新数据库的DBA技能,请下载Standard(或Enterprise)版并在那里进行。请注意,不再提供10克。