The error ORA-02236: invalid file name we may get in either of the below cases. Let’s go through the cases one by one :
Error : ORA-02236: invalid file name
Cause: A character string literal was not used in the filename list of a LOGFILE, DATAFILE, or RENAME clause.
Action: Use correct syntax.
Table of Contents
The error ‘ORA-02236: invalid file name’ we may get in either of the below cases :
Case 1: While adding the logfile :
While adding the logfile we may get this error as we can see the db_recovery_file_dest is not mentioned. So it will not take any location by default. So we have to follow the correct syntax mentioning the datafile name with location.
Error :
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 size 5G;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 size 5G
*
ERROR at line 1:
ORA-02236: invalid file name
or,
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 1 size 1M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 1 size 1M
*
ERROR at line 1:
ORA-02236: invalid file name
Check Below :
SQL> sho parameter db_create_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
Solution :
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 9 '/u01/app/oracle/TEST/redo/stdby_redo_g9m1.dbf' size 8M;
Database altered.
Case 2: while adding/resizing a datafile to a tablespace or creating a tablespace
Also, we can get this error while adding/resizing a datafile to a tablespace or creating a tablespace.
The datafile name has to be mentioned here until it is using OMF(Oracle Managed Files)
Error :
SQL> alter tablespace USERS
add datafile size 3G autoextend on maxsize 30G;
*
ERROR at line 1:
ORA-02236: invalid file name
Solution :
SQL> alter tablespace USERS add datafile '/u01/app/oracle/TEST/data/users02.dbf'
size 3G autoextend on maxsize 30G;
Database altered.
Case 3: while exporting from an ASM storage and importing into the non-asm storage.
Also, you may get this error while exporting from an ASM storage and importing into the non-asm storage. For the solution, you can check out the Oracle Doc ID 2464298.1 . Its nicely described here.
So, here are some of the easy steps to troubleshoot and resolve the error ORA-02236: invalid file name. Hope this helps!!
Our other ORA Error-Related Articels :
- How to resolve ORA-01507: database not mounted
- ORA-01090: shutdown in progress – connection is not permitted
Pingback: Insufficient SRLs reported by DGMGRL : Easy Guide