cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
316
Views
0
Helpful
2
Replies

Unity 4.X Shrinking ReportDB issue?

johnnywan
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

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

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

View solution in original post

2 Replies 2

David Hailey
VIP Alumni
VIP Alumni

Did you detach the DB before attempting to shrink?

Hailey

Please rate helpful posts!

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

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: