ORA-01516: nonexistent log file, data file, or temporary file "/u01/app/oracle/oradata/ramesh/tbs1.dbf"

  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

DELETE Statement in ORACLE DB— Step by Step Internal Flow with classroom example.

Imagine your Oracle database like a school, and you’re Teacher decides to remove a student (row) from the classroom(table). Let’s see how the journey works step by step: 1)Classroom = Oracle Table 2)Students = Rows (Records) 3)Class Teacher = Oracle Server Process 4)Attendance Register = Data Dictionary User fires DELETE statement: DELETE FROM students WHERE grade = 'D'; Internal Processing Steps: Client Process Sends DELETE Statement to Server Process The teacher receives a request to remove a student from the classroom. Syntax Check (Parsing) The teacher checks if the request is grammatically correct — proper command, keywords, and a semicolon. Semantic Check Teacher verifies if the classroom exists and whether the condition (like grade = 'D') makes sense. Object Resolution Teacher confirms that the ‘students’ classroom (table) exists in the school records (data dictionary). Optimization Decides the fastest way to find those students — by roll number, grade, or al...