473,703 Members | 4,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shrink SQL Server Database

1 New Member
I have database with 263GB where free space is about 45GB. By using below query I executed the shrinking activity.
Expand|Select|Wrap|Line Numbers
  1. USE [BriggsAX]
  2. GO
  3. DBCC SHRINKFILE (N'BriggsAX' , 250876)
  4. GO
but I got the following error after 2 and half hours. Can you please suggest how I can resolve this issue.
Expand|Select|Wrap|Line Numbers
  1. Msg 3140, Level 16, State 3, Line 1
  2. Could not adjust the space allocation for file 'dbfile_Dat'.
  3. DBCC execution completed.
  4. If DBCC printed error messages, contact your system administrator.
2 Weeks Ago #1
1 146
32,569 Recognized Expert Moderator MVP
Hi Tanveer.

I guess the obvious answer is to try this using a disk that has enough space for at least the original plus the shrunk copy - and then some spare. Disks never work well when they're down to the bare bones. 45GB (not Gb) is not tiny in itself, but when being asked to hold the data from a 263GB database that would have to be very sparesely populated to work.
2 Weeks Ago #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: John Mosey | last post by:
A huge (and never used) database log was taking up about 4 GB of HD space. We want the data for historical capacity, however, don't care about the transactions log. After a bit of research I ran the script on: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q256/6/50.asp&NoWebContent=1 (which works just fine on Sql Server 2k) And then
by: Jaeger | last post by:
Hi all. I'm having trouble shrinking a database. In short, using the SQL Query Analyzer, I enter the following commands: DBCC SHRINKDATABASE (database, 80) GO The command returns the expected 'DBCC execution completed.' response, but
by: willie | last post by:
Hi all: I restored one backup database (7.9 GB mdf) on two diffrent servers. I shrunk them by clicking "Move pages to beginning of file before shrinking". After shrinking, one mdf file is 6.7 GB, and the other is 4.2GB. I shunk again and again: 1. the 6.7GB become 5.9GB, 5.2GB, 4.7GB and 4.2Gb (four times) 2. the 4.2Gb become 4.0GB (just one more time)
by: Jens | last post by:
I have a database file LEAR_Index(yes, it hold index data) from a have have recently removed a bunch of data. It is about 120 Gb, 100Gb of which is not used. I wan´t to shrink the file to lean 30-40Gb. I´ve been trying this: dbcc shrinkfile('LEAR_Index',40000) But to no apparent avail; the file did not shrink.
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by the way. I have a transaction log of 1792 kb...
by: John Baker | last post by:
Hi: I have a report that contains a remarks field which is a "memo" format field. I have that field on a single line in the report, and have it given a property of "Can Shrink", in the hope that he line will vanish when there is no data entered in the memo field. Its not shrinking! There is nothing else on the line, and no field name or anything else. I have tried shrinking it to a single small line and saying "Can Grow", but its growing...
by: Tim Bücker | last post by:
Hello. The MeasureString method is quite slow so I am wondering how one can efficently draw a string in a growing or shrinking rectangle. In other words; having a huge rectangle the font size should be for example 100; having a small rectangle the font size should be 8. Any ideas? Thanks and greetings, Tim.
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients have reported that the server is running out of disk space and examination shows that the log files for several of the databases are at 5Gb or more. After reading around the subject I suggested the following sequence of operations:
by: Jerry Mcnealy | last post by:
There is an interesting article on java.net about SOA reusability, Shrinking the Lag between Business and IT: http://today.java.net/pub/a/today/2007/07/24/soa-reusability-shrinking-lag-time.html Blessings from business owners are important in all SOA implementations. This article articulates the vision of reusability with a different spin around the business users, the ultimate end users of SOA.
by: Joell | last post by:
Hello, I need help with shrinking the actual log file. I keep shrinking the trans logs but then it just reverts back to a 1 gig size trans log fille even after I have shrunk the file. What can I do? how do I code this in SQL?
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.