如题所示的问题,发生在我的12c的多租户数据库启动的时候,具体表现如下:

这个时候,我的后台日志(alert日志)的报错是这样的:

报错中,提到的控制文件:“cntrlcallah.dbf”,确实不存在:

但是OMF管理的“oradata”目录下,却存在一切控制文件:

将实例的控制文件,修改(指定)为上面找到的控制文件:

可以看到,还是出问题了。

这个时候,后台日志(alert)的报错,如下:

解法:
在数据库“NOMOUNT”阶段重建控制文件:

可以看到,当控制文件成功的创建完成后,数据库的状态就从NOMOUNT,到MOUNT了。
而这一步需要注意:创建控制文件的时候,引用的datafile的部分,不要包含临时表空间的数据文件。(CDB与PDB的临时文件都不能包含)

然后,数据库就可以打开了:

上面,从创建控制文件到数据库OPEN,这部分的后台日志(alert)如下:
控制文件的创建部分:

数据库OPEN的部分:

可以从日志中看到,由于创建控制文件的时候,没有跟上临时文件,于是有了一些关于临时文件的告警:
*********************************************************************
WARNING: The following temporary tablespaces in container(CDB$ROOT)
contain no files.
This condition can occur when a backup controlfile has
been restored. It may be necessary to add files to these
tablespaces. That can be done using the SQL statement:

ALTER TABLESPACE ADD TEMPFILE

Alternatively, if these temporary tablespaces are no longer
needed, then they can be dropped.
Empty temporary tablespace: TEMPTBS01
*********************************************************************

在处理临时文件的问题前,我们先查看下当前数据库的状态:

可以看到,确实查不到有关临时文件的信息。

创建临时表空间,并设为默认临时表空间:

——————————————————
Done。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装