When opening the pluggable, in case you get an error like
ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
Below are the steps to open the database
Login to the database as SYS user.
C:\Users\winni>sqlplus system/oracle123@WINNITHHOST:1521/xepdb1
SQL*Plus: Release 21.0.0.0.0 - Production on Sat May 9 11:09:15 2026
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Sat May 09 2026 11:07:48 +05:30
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
Now when opening the database you get the below error
SQL> alter pluggable database all open;
alter pluggable database all open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
ORA-01110: data file 13: 'C:\ORACLE\21CXE\ORADATA\XE\XEPDB1\HR.DBF'
Below are the steps to resolve it. Make the datafile offline and drop it. You can then open the PDB with the missing datafile.
SQL> alter session set container = XEPDB1;
Session altered.
SQL> alter database datafile 13 offline drop;
Database altered.
SQL> alter pluggable database XEPDB1 open;
Pluggable database altered.
When checking the listener status you get the below error
TNS-12545: Connect failed because target host or object does not exist
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-GHTEO05)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
64-bit Windows Error: 1001: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-GHTEO05)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
64-bit Windows Error: 1001: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
This is most probably because the listener cannot identify the HOSTNAME for the database machine.
The hostname for the machine could have changed.
To resolve this set the LOCAL_LISTENER parameter as below.
ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=WINNITHHOST)(PORT=1521))' SCOPE=BOTH;
ALTER SYSTEM REGISTER;
Now when starting the listener we get the error below
LSNRCTL> start
Starting tnslsnr: please wait...
Unable to OpenSCManager: err=5
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
To resolve this we need to open the cmd prompt and Administrator and then start the listener.
LSNRCTL> start
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 21.0.0.0.0 - Production
System parameter file is E:\install\21cXE\homes\OraDB21Home1\network\admin\listener.ora
Log messages written to E:\install\21cXE\diag\tnslsnr\WINNITHHOST\listener\alert\log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-GHTEO05)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
64-bit Windows Error: 1001: Unknown error
Listener failed to start. See the error message(s) above...
This error also is due to the listener cannot identify the host name.
So change the hostname to your machine new hostname in file $ORACLE_HOME/network/admin/listenerr.ora.
Make sure the hostname is also changed to the new hostname in $ORACLE_HOME/network/admin/tnsnames.ora.
Now try to login to the database using the alias set for the database in tnsnames.ora
If you get the below error
C:\Users\winni>sqlplus system/oracle123@xepdb1
SQL*Plus: Release 21.0.0.0.0 - Production on Sat May 9 11:05:51 2026
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
try connecting as below
C:\>sqlplus system/oracle123@//localhost:1521/xepdb1 OR
C:\>sqlplus system/oracle123@//WINNITHHOST:1521/xepdb1 OR
C:\>sqlplus system/oracle123@//127.0.0.1:1521/xepdb1
SQL*Plus: Release 21.0.0.0.0 - Production on Sat May 9 11:06:27 2026
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Sat May 09 2026 11:02:31 +05:30
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL>
Now the database is connected to the required PDB using the required listener.
God's Word for the day
Foul Language
Remember you Father and Mother when you sit among the great
or you may forget yourself among their presence
and behave like a fool through bad habit;
then you will wish that you had never been born,
and you will curse the day of your birth.
Those who are accustomed to using abusive language
will never become disciplined as long as they live.
Sirach 23:14-15
Gospel teachings of Jesus
Jesus foretells his death
From that time on, Jesus began to show his disciples
that he must go to Jerusalem and undergo great suffering
at the hands of the elders and chief priests and scribes,
and be killed, and on the third day be raised.
And Peter took him aside and began to rebuke him saying,
"God forbid it, Lord! This must never happen to you."
But he turned and said to Peter, "Get behind me satan!
You are a stumbling block to me. for you are setting
your mind not on divine things but on human things."
Mathew 16:21-23