今天做实验遇见一个问题
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 '/u01/oracle/oradata/orcl/redo01.log' SIZE 50M,
9 GROUP 2 '/u01/oracle/oradata/orcl/redo02.log' SIZE 50M,
10 GROUP 3 '/u01/oracle/oradata/orcl/redo03.log' SIZE 50M
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/oracle/oradata/orcl/system01.dbf',
14 '/u01/oracle/oradata/orcl/undotbs01.dbf',
15 '/u01/oracle/oradata/orcl/sysaux01.dbf',
16 '/u01/oracle/oradata/orcl/users01.dbf',
17 CHARACTER SET ZHS16GBK
18 ;
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01163: SIZE clause indicates 12800 (blocks), but should match header 25600
ORA-01110: data file 4: '/u01/oracle/oradata/orcl/users01.dbf'
查了下官方文档
ORA-01163: SIZE clause indicates string (blocks), but should match header string
Cause: The size specified in bytes in the SIZE clause of the CREATE CONTROLFILE statement does not equate to the number of blocks recorded in the header.
Action: Specify the correct filename and size ( in bytes ).
问题原因
在user01.dbf后多了一个逗号 去掉逗号之后一切正常。