Reduce Database Size

Posted by: ramnath-fp on 8 September 2017, 2:35 pm EST

  • Posted 8 September 2017, 2:35 pm EST

    Hi,

    I have one database backup size with 1.05 GB(After shrink database).

    main mdf file size is  1.06 GB.

     Any body have idea to delete trace or garbage data or unused space or deleted record log.

     How to reduce size of the backup.

     

    thanks and regards,

    Ram Nath 

    MUMBAI(INDIA)

  • Replied 8 September 2017, 2:35 pm EST

    Hello,

    Space is not 'reclaimed' automatically. Since expanded a database file is an 
    'expensive' operation, the decision to 'contract' is left to a deliberative 
    approach. You will have to reduce the database and/or file size to fit your needs. For additional information, look in Books Online for

     
    DBCC Shrinkdatabase

    DBCC ShrinkFile

     
    DBCC SHRINKFILE shrinks the size of the specified data/log file for the database.

    Syntax:

     
    DBCC SHRINKFILE

        ( { file_name | file_id }

            { [ , target_size ]

                | [ , { EMPTYFILE | NOTRUNCATE | TRUNCATEONLY } ]

            }

        )

    DBCC SHRINKDATABASE shrinks the size of the data files in the specified database.

    Syntax:

     
    ( database_name [ , target_percent ]

     [ , { NOTRUNCATE | TRUNCATEONLY } ]

     ) 

     
    You may also look at the following Microsoft link for  more information on how to reduce the database size:
    http://msdn.microsoft.com/en-us/library/93ha4180(v=vs.80).aspx

    Thanks,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels