Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Perform alter database move operation to report an error ORA-01516:

SQL > alter database move datafile'/ u01ax to'/ u01qapplash oracleuseroradataUniverse cdbusers01.dbf'r'/ u01apprenticespdbuser01.dbf'

Alter database move datafile'/ u01qqappActionoradata _

*

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.

Check to see if file 10 exists:

[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

File 10 exists.

At this time, do you think that log file and temporary file can only be available in con_name for your own database? Take the test with questions.

SQL > show con_name

CON_NAME

-

CDB$ROOT

First use the alter pluggable database move command to see if you can confirm the PDB file in the CDB database.

SQL > alter pluggable database move datafile'/ u01ax to'/ u01qapplash oracleuseroradataUniverse cdbusers01.dbf'r'/ u01apprenticespdbuser01.dbf'

Alter pluggable database move datafile'/ u01qqappActionoradata _

*

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 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'/ u01ax to'/ u01qapplash oracleuseroradataUniverse cdbusers01.dbf'r'/ u01apprenticespdbuser01.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 only use their own logs in their respective databases.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report