Hi @Chaitanya Kiran ,
>So, the database comes online before UNDO phase when restored with recovery?
No, the RESTORE Database WITH NORECOVERY option puts the database into a ‘restoring state’, and no users can access the database in this state.
> I would like to know why it is skipped and what will happen to the uncommitted transactions.
NORECOVERY specifies that rollback doesn't occur. This allows rollforward to continue with the next statement in the sequence.
In this case, the restore sequence can restore other backups and roll them forward. Then the undo phrase is not occurred, and the database is in a ‘restoring state’, until you restore the last log backup with recovery, which include the undo phrase.
If the user is restoring a database using multiple backup files, NO RECOVERY option is used for each restore except the last. The RESTORE Database WITH NORECOVERY option puts the database into a ‘restoring state’ so that additional backups can be restored and no users can access the database in this state. If user wants to recover database without using additional backups, RESTORE Database WITH RECOVERY option will be used to bring database online again making it usable for users.
Refer to the blog SQL Server Restore Database With Norecovery.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.