Oracle 表空间和数据文件遇到的坑
前 言
本文适用于普通的标准的 8k 块大小的 Oracle 企业版数据库,10g、11g、19c 均可适用,但对于 ODA 一体机可能有所区别,请慎重使用。
————————————————————————————
微信公众号:JiekeXu DBA之路
墨天轮:https://www.modb.pro/u/4347
CSDN :https://blog.csdn.net/JiekeXu
腾讯云:https://cloud.tencent.com/developer/user/5645107
————————————————————————————
正 文
db_files 的坑
记录一下年前遇到的一个关于表空间扩容的小问题,大家都知道对于 Oracle 普通的表空间直接 alter tablespace XX add datafile 添加数据文件则就可以扩容了。但是当执行此命令时却报错了 ORA-00059。
SQL> alter tablespace PROD_DATA add datafile '+DATA' size 30g;
alter tablespace DWD_DATA add datafile '+DATA' size 30g
*
ERROR at line 1:
ORA-00059: maximum number of DB_FILES exceeded
SQL> exit
Disconnected
[oracle@JiekeXu ~]$ oerr ora 58
00058, 00000, "DB_BLOCK_SIZE must be %s to mount this database (not %s)"
// *Cause: DB_BLOCK_SIZE initialization parameter is wrong for the database
// being mounted. It does not match the value used to create the
// database.
// *Action: Fix the value of the DB_BLOCK_SIZE parameter or mount a database
// that matches the value.
[oracle@JiekeXu ~]$ oerr ora 59
00059, 00000, "maximum number of DB_FILES exceeded"
// *Cause: The value of the DB_FILES initialization parameter was exceeded.
// *Action: Increase the value of the DB_FILES parameter and warm start.