The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.
Causes and Solutions
Incorrect file path
The file that you want to operate on may be in another directory like /oradata2 or disk group DATA2. You should make sure about it.
The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.
Summary: I will teach how to solve ORA-01516?
Causes and Solutions
Misspelled file name
Occasionally, you might take one file as another or misspelled the file name. Please inspect the filename again.
Incorrect database
In wrong database, the file is definitely not found. You should go for the right database.
Already dropped
Chances are, you could have dropped the file before and you don't remember.
Nothing ever
There's been no such file in the database ever since its creation. You might copy and paste the statement from somewhere else.
In my case, I enter the wrong datafile location like non-directory 😂
1) I have created the tablespace in one place.
SQL>create tablespace tbs datafile '/u01/app/oracle/oradata/orcl/tbs1.dbf' size 10m;
Tablespace created.
2)add the datafile a non-directory location
SQL> alter database datafile '/u01/app/oracle/oradata/orcl/tbs1.dbf' resize 20m;
alter database datafile '/u01/app/oracle/oradata/ramesh/tbs1.dbf' resize 20m
*
ERROR at line 1:
ORA-01516: nonexistent log file, data file, or temporary file "/u01/app/oracle/oradata/ramesh/tbs1.dbf"
3)After i have changed the location its work well!
SQL> alter database datafile '/u01/app/oracle/oradata/orcl/tbs1.dbf' resize 20m;
Database altered.
SQL>
Thanks for your time!!
0 Comments