Thursday, March 13, 2014

ORA-13504

This was tested on Oracle 11.2.0.4. If you try to create a database like this i.e. without specifying a SYSAUX datafile clause:
 
create database extent management local
datafile '/database/NBAPERF/nba_system/system1.dbf'
size 100m autoextend on
logfile
group 1 ('/database/NBAPERF/nba_redo1/log1a.rdo',
         '/database/NBAPERF/nba_redo2/log1b.rdo') size 50m,
group 2 ('/database/NBAPERF/nba_redo1/log2a.rdo',
         '/database/NBAPERF/nba_redo2/log2b.rdo') size 50m
maxlogfiles 3
maxlogmembers 3
user sys identified by secret_password
user system identified by secret_password
default temporary tablespace temp
tempfile '/database/NBAPERF/nba_temp/temp1.dbf'
size 100m autoextend on
undo tablespace undotbs1
datafile '/database/NBAPERF/nba_system/undo1.dbf'
size 100m autoextend on
character set WE8ISO8859P1
/
 
Oracle will return an ORA-13504 and your database will not be created:
 
SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20  create database extent management local
*
ERROR at line 1:
ORA-13504: No SYSAUX datafile clause specified
 
SQL>
 
You can stop this error occurring by specifying a SYSAUX datafile clause, as shown below:
 
create database extent management local
datafile '/database/NBAPERF/nba_system/system1.dbf'
size 100m autoextend on
sysaux datafile '/database/NBAPERF/nba_system/sysaux1.dbf'
size 100m autoextend on
logfile
group 1 ('/database/NBAPERF/nba_redo1/log1a.rdo',
         '/database/NBAPERF/nba_redo2/log1b.rdo') size 50m,
group 2 ('/database/NBAPERF/nba_redo1/log2a.rdo',
         '/database/NBAPERF/nba_redo2/log2b.rdo') size 50m
maxlogfiles 3
maxlogmembers 3
user sys identified by secret_password
user system identified by secret_password
default temporary tablespace temp
tempfile '/database/NBAPERF/nba_temp/temp1.dbf'
size 100m autoextend on
undo tablespace undotbs1
datafile '/database/NBAPERF/nba_system/undo1.dbf'
size 100m autoextend on
character set WE8ISO8859P1
/
 
… and the database will be created successfully:
 
SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22
Database created.
 
SQL>

No comments: