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

Source: Internet
Author: User


Execute ALTER DATABASE move operation Error 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 isn't 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.


To see if file 10 exists:


[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


File 10 exists.

This time think of log file, temporary file can only be used in con_name for their own database? Test with questions.


Sql> Show Con_name


Con_name

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

Cdb$root


First, use the Alter pluggable database move command to see if it is possible to have a PDB file in the CDB databases.

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



Obviously, the ALTER pluggable database Move command is not supported in CDB




Next, perform the alter pluggable database move operation in the PDB

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


Success!

Summary: Although Oracle 12c log files are shared, CDB and each PDB can use their own logs only in their respective databases.


This article is from the "unity of Knowledge" blog, please be sure to keep this source http://dovelauren.blog.51cto.com/9876026/1720631

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.