I have executed these two commands:
USE master GO RESTORE DATABASE test FROM Kingston WITH NORECOVERY GO
USE master GO RESTORE LOG test FROM Kingston WITH STOPAT = '2020-05-13 14:05:25', RECOVERY; GO
But now I get this error while accessing the database with
USE test GO:
Database 'test' cannot be opened. It is in the middle of a restore.
When it clearly isn't. Any suggestions how to fix it? So far found out that
RECOVERY helps, but as you can see it doesn't.
RECOVERY doesn't help, because then I'm unable to execute 2nd command (throws error), and I need that log at specific moment.
I have found the solution. You need additional command:
RESTORE DATABASE test WITH RECOVERY GO
It appears that
RECOVERY is ignored in
RESTORE LOG command, and it needs additional command to confirm that restoring has been finished. I appreciate the help though.