Monday, March 19, 2012

Decrease the size of a Sql 2000

i had set the size of a new database to 5 GB and transactional log file to 50
MB. Now i realized that the database would grow to this size might be in the
next 20years and so want to decrease it to 100 MB ( the DB back up file is
only 20MB) and set it to "Autmatically Grow File" for both MDB and LDB files.
I could not find any option anywhere in help to do this. When i enter a value
of 100 MB in space allocated under the DataFile properties Tab it gives me a
message "file size cannot be decreased, it can only be increased.". Please
tell me if there is any way to do this.
thanks> i had set the size of a new database to 5 GB and transactional log file to
50
> MB. Now i realized that the database would grow to this size might be in
the
> next 20years and so want to decrease it to 100 MB ( the DB back up file is
> only 20MB) and set it to "Autmatically Grow File" for both MDB and LDB
files.
> I could not find any option anywhere in help to do this. When i enter a
value
> of 100 MB in space allocated under the DataFile properties Tab it gives me
a
> message "file size cannot be decreased, it can only be increased.". Please
> tell me if there is any way to do this.
Hi!
Do please check the DBCC SHRINKFILE command in Books OnLine.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||I suggest you do this from Query Analyzer using the DBCC SHRINKFILE command (which is documented in
Books Online).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sameer" <sameer@.discussions.microsoft.com> wrote in message
news:F8D6293E-7949-4E1F-B68C-B27E912164C1@.microsoft.com...
>i had set the size of a new database to 5 GB and transactional log file to 50
> MB. Now i realized that the database would grow to this size might be in the
> next 20years and so want to decrease it to 100 MB ( the DB back up file is
> only 20MB) and set it to "Autmatically Grow File" for both MDB and LDB files.
> I could not find any option anywhere in help to do this. When i enter a value
> of 100 MB in space allocated under the DataFile properties Tab it gives me a
> message "file size cannot be decreased, it can only be increased.". Please
> tell me if there is any way to do this.
> thanks
>

No comments:

Post a Comment