Unity 4.X Shrinking ReportDB issue?

Answered Question
Aug 19th, 2010

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?

I have this problem too.
0 votes
Correct Answer by Aaron Harrison about 6 years 5 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
David Hailey Mon, 08/23/2010 - 20:31

Did you detach the DB before attempting to shrink?

Hailey

Please rate helpful posts!

Correct Answer
Aaron Harrison Tue, 08/24/2010 - 00:52

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

Actions

This Discussion