Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 587275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:11:43+00:00 2026-05-13T15:11:43+00:00

I have a very large database (40 gig) and have run the procedure sp_space_used

  • 0

I have a very large database (40 gig) and have run the procedure

sp_space_used 

and found that there is 10 gig of unallocated space. Obviously this is a lot and the .mdf file is taking up most of the disk. I have looked into running

DBCC SHRINKDATABASE (db, TRUNCATEONLY);

Do I also need to shrink the transaction log or will shrinkdatabase take care of this? What are the negative implications of running this procedure? Can I run this while the database is in use? I’ve tried running the shrinkdatabase command but still have lots of unallocated space.

database_size   unallocated space
49575.06 MB   8393.49 MB

reserved       data        index_size   unused
42170328 KB 22704672 KB 19099160 KB  366496 KB

NOTE: the database has a simple recovery model so I’m guessing I don’t need to backup the log at all.

What is the difference between running

DBCC SHRINKFILE (datafile, TRUNCATEONLY)

to

DBCC SHRINKDATABSE (db, TRUNCATEONLY)?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:11:44+00:00Added an answer on May 13, 2026 at 3:11 pm

    I ended up using DBCC SHRINKDATABASE (db, %); specifying a target percentage which seemed to solve my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a very large database that we need to occasionally replicate on our
We have a client that is using CRM against a very large database. They
I have a very large database (with new information being added everyday) that a
I have a very large (100+ gigs) SQL Server 2005 database that receives a
I have a large database of normalized order data that is becoming very slow
I have a very large Oracle database, with many many tables and millions of
I have a very large UIView approx 3000x3000 in size. In this large view
I have a very large possible data set that I am trying to visualize
I have a very large set of permissions in my application that I represent
I have a very large list Suppose I do that (yeah, I know the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.