473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2196

"Jaeger" <ja******@adelphia.net> wrote in message
news:x7********************@adelphia.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******@adelphia.net> wrote in message
news:x7********************@adelphia.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
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...
1
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...
6
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...
1
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...
4
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...
2
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...
3
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 ...
2
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...
7
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...

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.