Here is a one of the very common question I keep on getting via email.
“I just restored all the backup files of my database, however, my database is still stuck in restoring state. How do I fix it?”
Well, if you have already restored all the database, you can execute the following code and it will bring your database from recovery to operational state.
RESTORE DATABASE NameofDatabase
WITH RECOVERY
If due to any reason, above query returns error about restoring log files or any other file and you do not have that file in your hand, you can run following command.
Remember above command will roll forward your database and you will be not able to restore any other database after that.
RESTORE DATABASE NameofDatabase
WITH RECOVERY,REPLACE
If you are not sure what to do, leave a comment and I will help you out with your situation.
Reference: Pinal Dave (https://blog.sqlauthority.com)