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

执行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"

[[email protected] ~]$ 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是否存在:

[[email protected] 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只能在各自数据库使用自己的日志。

时间: 2024-10-09 23:13:07

Oracle 12c ORA-01516: nonexistent log file, data file, or temporary file "10"的相关文章

Oracle 12C R2 on Linux 7.X Data Guard 搭建文档

1.查看主机和数据库信息 [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue May 29 01:19:35 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0

Oracle 12c安装报错Installation failed to access the temporary location(无法访问临时位置)

报错如图 1.先检查当前windows账户用户名是否为全英文,没有就新建一个,大多数用户败在这一步,而官方也没有解释 如何新建:开始-->控制面板-->用户账户和家庭安全-->用户账户-->管理其他账户-->创建一个新账户 账户名填:oracledb,类型选管理员 点创建账户 然后注销或重启,再用oracledb这个用户名登录 2.开启C盘共享 由于默认会在%TEMP%下创建临时文件来安装,而临时文件又在C盘,所以我们需要对C盘设置共享 对win7及以上系统,双击计算机,左侧

ORA-01565: error in identifying file '+DATA/ORACLE/spfileORACLE.ora'

操作系统为suse11sp3_x86_64位,数据库为11204. 不小心修改了RAC目录及子目录的权限,资源启动后发现两个节点数据库都未启动,如下: jason1:/u01/app/11.2.0/grid/bin # ./crsctl stat res -t -------------------------------------------------------------------------------- NAME           TARGET  STATE        SE

Oracle 12c Data Guard 搭建手册

Oracle 12c 的DataGuard 是在CDB 级别进行的,所以我们的配置都是从CDB角度出发. 测试里主备库的数据库CDB名称相同. 1  环境说明 OS Version: [[email protected] etc]# cat /etc/oracle-release Oracle Linux Server release 6.3 [[email protected] etc]# uname -r 2.6.39-200.29.3.el6uek.x86_64 DB Version: S

Oracle 12C Data Gurad RAC TO RAC

Oracle 12C RAC TO RAC Data Guard on RHEL7 0.环境说明   primary db physical standby 操作系统 rhel7 x86_64 rhel7 x86_64 数据库版本 12.2.0.1 12.2.0.1 IP 10.150.10.134/136 10.150.10.139/141 主机名称 vm-oradb1-N1/N2 vm-oradb2-N1/N2 数据库名称 albin albin db_unique_name albin a

Linux/Unix shell 监控Oracle告警日志(monitor alter log file)

使用shell脚本实现对Oracle数据库的监控与管理将大大简化DBA的工作负担,如常见的对实例的监控,监听的监控,告警日志的监控,以及数据库的备份,AWR report的自动邮件等.本文给出Linux 下使用 shell 脚本来监控 Oracle 告警日志(monitor alter log file). Linux Shell的相关参考:        Linux/Unix shell 脚本中调用SQL,RMAN脚本        Linux/Unix shell sql 之间传递变量   

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability ORA-19625: error identifying file /home/Oracle/PROD/1_2_844469007.dbf

rman备份archivelog时出现以下错误: RMAN> backup archivelog all delete input; Starting backup at 14-APR-14 current log archived using channel ORA_DISK_1 using channel ORA_DISK_2 RMAN-00571: =========================================================== RMAN-00569:

Data Guard:Oracle 12c –新增和更新的功能 (Doc ID 1558256.1)

Data Guard: Oracle 12c – New and updated Features (Doc ID 1558256.1) APPLIES TO: Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]Oracle Database Cloud Schema Service - Version N/A and laterOracle Database Exadata Clo

Oracle 12C 新特性之扩展数据类型(extended data type)

Oracle 12C 新特性-扩展数据类型,在12c中,与早期版本相比,诸如VARCHAR2, NAVARCHAR2以及 RAW这些数据类型的大小会从4K以及2K字节扩展至32K字节.只要可能,扩展字符的大小会降低对LOB数据类型的使用.为了启用扩展字符大小,你必须将MAX_STRING_SIZE的初始数据库参数设置为EXTENDED. 实验流程:1.查看参数max_string_size默认值SQL> show parameter max_string_sizeNAME     TYPE VA