Meghana,
I don't know if this will help your current situation/error, but I am wondering if the DiscoverDb2 Backup/Restore episodes in this YouTube play list would be helpful to you.
Regarding your current problem, I would confirm that there are not any old logs from previous attempted restores in the overflow log path directory. I would also confirm there are not any old logs in the assigned LOGARCHMETH1 directory of this database when you are restoring it. I've seen old logs in the log archive directory cause confusion for Db2 even when specifying a LOGTARGET. If you are not sure what the archive log directory will be when restoring, you should be able to issue (db2 "get db cfg for TEST21" | grep LOGARCHMETH1 after the restore step but before the rollforward step.
Edit (adding a few hours later)
You may also want to adjust your timestamp format in the ROLLFORWARD statement. Your timestamp format looks correct and matches what is in the example through documentation. But I swear the few times I have done this I have specified a timestamp down to a nanosecond with something similar to 2023-03-10-19.00.46.000000. Maybe that makes a difference?
------------------------------
-----------------
Michael Krafick (Twitter: @mkrafick)
IBM Champion for Data and AI
------------------------------
Original Message:
Sent: Tue March 07, 2023 05:27 AM
From: meghana m
Subject: point in time recovery and facing issue.
Hi Team.
We are testing point in time recovery and facing issue. Could you please check and help on this..
Are your Db2 databases partitioned: NO Database Partition .
Restoration steps
-----------
1> Full online backup
db2 backup database <dbname> online to /DB2/backup_prod_nonec/backup_qa/ compress include logs
2>date ;deleted 1 records : date
3>restore db
[db2inst1@elmqadb02 backup_prod_nonec]$ db2 "RESTORE DATABASE test8 TAKEN AT 20230306074405 INTO test21 logtarget '/DB2/backup_prod_nonec/over_olg2'"
DB20000I The RESTORE DATABASE command completed successfully.
test8 db : archival directory here few logs are copy and trasfer to this directory /DB2/backup_prod_nonec/over_olg2
4>rollforward db
[db2inst1@elmqadb02 C0000001]$ db2 rollforward db test21 to 2023-03-06-07.45.19 using local time and complete overflow log path "(/DB2/backup_prod_nonec/over_olg2)"
SQL4970N Rollforward recovery stopped on the database named "TEST21" because
the rollforward utility cannot reach the specified stop point (end-of-log or
point-in-time) on the following database partitions: "0".
------------------------------
meghana m
------------------------------