Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Issue in DB Restore
WhatsApp
Venkatesan Jayakantham
12y
2.6
k
0
0
25
Blog
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
Issue in DB Restore
Up Next
Script for Point in Time Recovery – Back Up and Restore
Ebook Download
View all
Basic SQL Queries
Read by 19.4k people
Download Now!
Learn
View all
Membership not found