In my case this error caused by, when restore backup file we choose another name for db, unfortunately the logical name is still using previous name.
So the solution is :
Please following this step :
- Open management studio
- Right click the database > Properties
- Pics
- Click files and change the logical the with the correct one, for me is 'MSDBAX' replace with 'MSTestAX'
- Pics
- Click ok
- Now you can run the script for truncate the log file, like sample below
GO
ALTER DATABASE [MSTestAX] SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(MSTestAX_log, 1)
ALTER DATABASE [MSTestAX] SET RECOVERY FULL WITH NO_WAIT
GO
8. Finish
No comments:
Post a Comment