Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: Compacting a database MS SQL

    Hi

    for mS SQL 2000-2500

    LDF and MDF files can be very very big, if I import the datas into a new database they can become 10 time smaller

    is there a way to compact (reduce the MB) of a database ?

    thank you

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Look up DBCC SHRINKDATABASE and DBCC SHRINKFILE in BOL.

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    thank you !

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Do not shrink your databases. It can impair performance. SQL Server databases are not like Microsoft Access databases, and do not need to be regularly compacted.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    Quote Originally Posted by anselme
    if I import the datas into a new database they can become 10 time smaller.

    is there a way to compact (reduce the MB) of a database ?
    Yeah, you can transfer required data in the new database - using DTS.

    Accordingly, make changes in your application for accessing old data too.

    Note : Before any action you need to deeply analyze pros & cons for the current issues as well as upcoming issues.
    Last edited by rajeshpatel; 11-13-06 at 02:23.
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •