How do I shrink a SQL Server 2005 Compact Edition Transaction Log (ldf)?

  • I have an application (ServiceCEO) that bundles SQL Server 2005 Compact Edition. The sql data (mdf) currently uses about 600MB of space, while the transaction log (ldf) uses about 60GB of space. After performing a backup of the database using a Backup or Restore Database tool provided by the application, is there a way to shrink the transaction log, like how its possible in SQL Server 2005?

    The ServiceCEO app does not bundle any other management tool for the database, besides the backup and restore tool... Is there is a generic management tool available for managing SQL Server 2005 Compact Edition databases?

  • Hi,

    I dont know will be usefull, but you can shrink or verify your sql compact db via SqlCeEngine class which includes shrink function.

  • Do you mean SQL Express? To my knowledge Compact edition only has a a single file .sdf.

  • Of course there is one .sdf file for SQLCE database. I mean that there is a SqlCEEngine class in System.Data.SqlServerCe.dll library. And SqlCeEngine.Shrink function can be used for shrink SqlCE ( .sdf ) database.

    I hope i didnt misunderstand the topic.if i am, i am sorry. 😉

  • forneed (1/14/2009)


    Of course there is one .sdf file for SQLCE database. I mean that there is a SqlCEEngine class in System.Data.SqlServerCe.dll library. And SqlCeEngine.Shrink function can be used for shrink SqlCE ( .sdf ) database.

    I hope i didnt misunderstand the topic.if i am, i am sorry. 😉

    Right, but the OP specifically mentions an mdf and an ldf which is why I asked if they meant SQL Express.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply