You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.0 version.
Commands: How to compact database?
To compact a database, please use
CompactDatabase command available in
Operation CompactDatabase(string databaseName);
|databaseName||string||Name of a database to compact|
Operation operation = store .DatabaseCommands .GlobalAdmin .CompactDatabase("Northwind"); operation.WaitForCompletion();
Compacting operation is executed asynchronously and during this operation the database will be offline.