Hi @Katung M Aduwak ,
This error may arise if another application is accessing the backup file and preventing SQL restore Pro access it. We can use Process Explorer to identify the process that is accessing the backup file. Please follow below steps.
1.Download Process Explorer from the Microsoft website and run it on the computer on which you tried to restore the backup.
2.On the Find menu, select Find Handle or DLL.
3.In the Handle or DLL substring box, type the full restore path and file name, then click Search.
4.Process Explorer displays the applications that are currently accessing the file. Stop the application from accessing the file, or run the restore at a time when the application is not accessing the file.
In addition, did you restore the backup up file to default instance firstly, then restore this backup to named instance? Suggest you adding move parameter in restore command as below. Below is a test in my environment. The MOVE statement causes the data and log file to be restored to the specified locations. Name instance and default instance has different location for database files as Erland mentioned.
RESTORE DATABASE Cathy FROM DISK = 'C:\Cathytest\Cathy.bak'
WITH
MOVE 'Cathy' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.SQL2019\MSSQL\DATA\Cathy.mdf',
MOVE 'Cathy_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL15.SQL2019\MSSQL\DATA\Cathy_log.ldf',
REPLACE
;
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".