Issue in DB Restore

While working with data intensive application, I've face da typical issue with Backup and Restore operation.
I've took the backup, Now am trying to restore the backed up file.. Oops, it's strucked up in the mid.
Around 92%, DB restoration is strucked up.

Started analysing the issue, I've found a typical reason for this issue.

"The log file becomes too huge almost 65GB and while trying to take the backup, the backup file couldn't intake the entire data and log files due to memory constraints. While restoring, the backup file is trying to restore."

Solution: Trucate the log file and take backup and restore the file. Everything will be fine.

USE AA
GO

ALTER DATABASE aa SET RECOVERY SIMPLE WITH NO_WAIT 
DBCC SHRINKFILE(aa_log, 1)
ALTER DATABASE aa SET RECOVERY FULL WITH NO_WAIT

GO


Note: Please take utmost care in production environment. You can't set the recovery model as Simple. In that case, you need to take the backup of the log file. Move it to different location and afterwards try to create a new file.

Cheers,
Venkatesan Prabu .J
Head, KaaShiv Infotech