Can I shrink a Primary Data File?

Can I shrink a Primary Data File?

Post by Jonathan Dav » Tue, 21 Sep 1999 04:00:00



I'm having problems shrinking my PRIMARY data file. Every time I run:

DBCC SHRINKFILE (web_db1_Data)

I get a message as though it completed, but the file never decreases
in size!

Alternativly, it would be nice to transfer the "primary status" to
another data file. Anyone know how to accomplish this?

Thanks in Adv.
-Jonathan Davis

 
 
 

Can I shrink a Primary Data File?

Post by Fernando G. Guerrer » Wed, 22 Sep 1999 04:00:00


You can't shrink your database file to a size smaller than your initial
(creation) size.

You can change the DEFAULT status of a filegroup, but you can't change the
PRIMARY Status of a database file or filegroup. That file is required to
hold all your system objects and the physical location of that file is
stored in 'sysdatabases' table and in the 'filename' field.

--
Fernando G. Guerrero
MCDBA, MCSD, MCT, MCSE+Internet
QA Group Ltd., UK


Quote:> I'm having problems shrinking my PRIMARY data file. Every time I run:

> DBCC SHRINKFILE (web_db1_Data)

> I get a message as though it completed, but the file never decreases
> in size!

> Alternativly, it would be nice to transfer the "primary status" to
> another data file. Anyone know how to accomplish this?

> Thanks in Adv.
> -Jonathan Davis


 
 
 

1. Shrink the Primary Transaction Log File

I've tried shrink database and it shrinks the mdf file but not the ldf
file. I've tried alter database to add another ldf (log) file and make
it the primary file with a smaller size but I cannot change file to the
primary default file, I can only chang filegroup defaults.

Is there a way to shrink the transaction log?

Thanks,

Ken

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Selecting rows from a database

3. Shrinking data file and log file

4. Conspicuous Silence on the Pick Home Front

5. Database file shrink if auto-shrink off

6. Your opinions about software piracy

7. Cans access2.0 engine access btrieve files?

8. Shrink Data File

9. Failed to shrink data file in sql server

10. shrinking data file of tempdb

11. Can't Shrink Data File

12. shrinking file size by deleteing data in image fields