473,774 Members | 2,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem shrinking a database

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
the database
remains the same size when I run 'sp_helpdb database'. Am I missing
something?

Thanks in advance,

Jaeger
Jul 20 '05 #1
2 2226

"Jaeger" <ja******@adelp hia.net> wrote in message
news:x7******** ************@ad elphia.com...
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
the database
remains the same size when I run 'sp_helpdb database'. Am I missing
something?

Thanks in advance,

Jaeger


Here's one possible reason:

http://support.microsoft.com/default...b;en-us;324432

Also, you can't shrink a database below its minimum file size, and you can't
shrink it smaller than the model database - see "DBCC SHRINKDATABASE" in
Books Online. You might want to try using DBCC SHRINKFILE to shrink the
files individually, as that way you can specify a precise size for the
files.

Simon
Jul 20 '05 #2
Thanks for the reply, Simon.

Crazy thing is that I'm doing an excercise as outlined in the 'Teach
yourself MS SQL Server 2000 in 21 days' wherein this very instruction is to
be performed. One would expect these exercises to be tried and tested.

Jaeger

"Simon Hayes" <sq*@hayes.ch > wrote in message
news:41******** **@news.bluewin .ch...

"Jaeger" <ja******@adelp hia.net> wrote in message
news:x7******** ************@ad elphia.com...
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 the database
remains the same size when I run 'sp_helpdb database'. Am I missing
something?

Thanks in advance,

Jaeger
Here's one possible reason:

http://support.microsoft.com/default...b;en-us;324432

Also, you can't shrink a database below its minimum file size, and you

can't shrink it smaller than the model database - see "DBCC SHRINKDATABASE" in
Books Online. You might want to try using DBCC SHRINKFILE to shrink the
files individually, as that way you can specify a precise size for the
files.

Simon

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2020
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
1
2241
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)
6
3096
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.
1
1635
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...
4
6731
by: Tommy.Vincent | last post by:
hi all, This will be a easy question for all out here. I have a database of 28GB. having 3 Data Files 22 GB, 3.58 Gb and 2.70 GB respectively. and a Transaction Log file of 156 mb. When i executed DBCC Shrinkdatabase(databasename),it reduced size of datafile but the LOG file had gone up to 5 Gb from 156mb.
2
7556
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...
3
2519
by: Zvonko | last post by:
Hi guys. I have a huge database file. When I run sp_spaceused this are the results: db_size 1337,31 Mb unallocated 14,62 Mb reserved 1088456 Kb data 258992 Kb index_size 6224 Kb
2
1567
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:
7
3982
khickyphutz
by: khickyphutz | last post by:
Good day! I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database size is around 1.8GB. There is an approximate growth of 1GB+ per day in the transaction log. I have tried backing up the transaction log with the option of remove inactive transaction logs but it wont work, as well as backing up completely the...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10040
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,...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
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...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.