08-19-2010 09:36 AM - edited 03-16-2019 12:21 AM
I am having an issue shrinking the Unity ReportDB log. I run the SQL commands but get the error that it could not shrink due to the files are currently being used. I have tried shrinking with Unity stopped as well. Any suggestions?
Solved! Go to Solution.
08-24-2010 12:52 AM
Hi
What commands are you using to shrink it?
If you aren't sure of the commands, you can do it this way:
1) Go into SQL Enterprise Manager
2) Browse to the name of the DB under the Databases section
3) Right click the DB, go to all tasks, then 'backup database'. Select a transaction log backup, and back it up. Doesn't matter where if your only intention is to shrink the file; backing it up allows the system to mark the log as used so it can be removed.
4) Exit the backup dialog, and then right click the DB again... click All Tasks, then Shrink Database. Click the 'Files' button, then select the 'log' file in the Database file drop down menu. Hit OK.
Regards
Aaron
08-23-2010 08:31 PM
Did you detach the DB before attempting to shrink?
Hailey
Please rate helpful posts!
08-24-2010 12:52 AM
Hi
What commands are you using to shrink it?
If you aren't sure of the commands, you can do it this way:
1) Go into SQL Enterprise Manager
2) Browse to the name of the DB under the Databases section
3) Right click the DB, go to all tasks, then 'backup database'. Select a transaction log backup, and back it up. Doesn't matter where if your only intention is to shrink the file; backing it up allows the system to mark the log as used so it can be removed.
4) Exit the backup dialog, and then right click the DB again... click All Tasks, then Shrink Database. Click the 'Files' button, then select the 'log' file in the Database file drop down menu. Hit OK.
Regards
Aaron
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide