广告
返回顶部
首页 > 资讯 > 数据库 >Oracle 12c ORA-01516: nonexistent log file, data file, or temporary file "10"
  • 517
分享到

Oracle 12c ORA-01516: nonexistent log file, data file, or temporary file "10"

2024-04-02 19:04:59 517人浏览 独家记忆
摘要

执行alter database move操作报错ORA-01516:sql> alter database move datafile '/u01/app/oracle/oradata/cdb/pd


执行alter database move操作报错ORA-01516:

sql> alter database move datafile '/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf' to '/u01/app/pdb_user01.dbf';

alter database move datafile '/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf' to '/u01/app/pdb_user01.dbf'

*

ERROR at line 1:

ORA-01516: nonexistent log file, data file, or temporary file "10"



[oracle@ora12c ~]$ oerr ora 1516

01516, 00000, "nonexistent log file, data file, or temporary file \"%s\""

// *Cause:  An attempt was made to use ALTER DATABASE to rename

//          a log file, data file, or temporary file; or to change attributes

//          of a data file or temporary file (for example, resize, autoextend,

//          online or offline); or to re-create or move a data file.

//          The attempt failed because the specified file

//          is not known to the database's control file

//          or is not of a type supported by the request.

// *Action: Specify the name or number of an existing file

//          of the correct type, as appropriate.

//          Check the relevant V$ table for a list of possible files.


查看file 10是否存在:


[oracle@ora12c backup]$ du -sh /u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf

5.1M/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf


文件10存在。

这个时候想到log file、temporary file难道只能在con_name为自己数据库可用?带着疑问做测试


SQL> show con_name


CON_NAME

------------------------------

CDB$ROOT


首先用alter pluggable database move命令来看看是否在CDB数据库中能否一定PDB文件。

SQL> alter pluggable database move datafile '/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf' to  '/u01/app/pdb_user01.dbf' ;


alter pluggable database move datafile '/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf' to  '/u01/app/pdb_user01.dbf' ;


                                                                                          *

ERROR at line 1:

ORA-01916: keyWord ONLINE, OFFLINE, RESIZE, AUTOEXTEND or END/DROP expected



显然,在CDB中不支持alter pluggable database move命令




接下来在pdb中执行alter pluggable database move操作

SQL> show pdbs        


    CON_ID CON_NAME  OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED  READ ONLY  NO

3 PDB  READ WRITE NO

SQL> alter session set container=pdb;


Session altered.


SQL> alter database move datafile '/u01/app/oracle/oradata/cdb/pdb/pdb_users01.dbf' to '/u01/app/pdb_user01.dbf';


Database altered.



SQL> select name,status from v$datafile where file#=10;


NAME                                                                             STATUS

-------------------------------------------------------------------------------- -------

/u01/app/pdb_user01.dbf                                                          ONLINE


成功!

   总结:尽管oracle 12c日志文件共享,但是cdb和各个pdb只能在各自数据库使用自己的日志。


您可能感兴趣的文档:

--结束END--

本文标题: Oracle 12c ORA-01516: nonexistent log file, data file, or temporary file "10"

本文链接: https://www.lsjlt.com/news/39591.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作