Shrinking SQL 2000, 2005 Databases

Discussion in 'Databases' started by makemoney58, Aug 14, 2010.

  1. #1
    If you ever run in a situation like you have only MBs of space left on production SQL servers and your transaction logs are growing bigger and bigger and you want to claim disk space immediately then you might need to run following command

    Shrinking SQL 2000, 2005 Databases
     
    makemoney58, Aug 14, 2010 IP
  2. ksrao

    ksrao Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    To shrink the data base
    You have to use two commands
    1. DBBC SHIRNKDATABASE command
    2. DBCC Shrink File command

    Regards

    Kolla Sanjeeva Rao .
    Try some online tests at
    http://www.wiziq.com/online-tests/9120-sql-server-interview
     
    ksrao, Aug 15, 2010 IP
  3. georgiivanov

    georgiivanov Member

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #3
    Why not this one:
     
    georgiivanov, Aug 16, 2010 IP
  4. TomDeSuecia

    TomDeSuecia Greenhorn

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    You can directly from SSMS shrink the database. With SSMS you have a good overview and it is easier as you do not need to use commands.
     
    TomDeSuecia, Aug 17, 2010 IP