Database maintenance Sitefinity 6.2
Hello,
I recently inherited a Sitefinity 6.2 web site. One of the concerns is that the Sitefinity MSSQL website is 2GB. Assets are stored in FileSystem. In reviewing the tables, I noticed these are pretty large:
sf_chunks
sf_permissions
sf_version_chnges
sf_control_properties
sf_object_data
sf_object_data_sf_permissions
Is there any documentation on how to clean up old data?
If we have to manually delete, can we delete based on last_modified, and if so, what are the related tables we should delete rows from as well (what's the PK/FK?)?
Thanks.
I'd try to stay away from making direct database changes, it's too easy to miss something.
If you are going to delete, I'd stick to the API:
docs.sitefinity.com/for-developers-delete-images
But I think a better solution, is to change the storage provider of the images.
docs.sitefinity.com/storage-providers-for-libraries
You can use either the file system or some kind of CDN host like Amazon. This will free up space in the database, and if you store the images remotely, you'll lessen your server burden a bit.
I am already using the FileSystem to store files/documents/images.
With files/documents/images already in the FileSystem, the database is still very large. I narrowed it down to the above-mentioned tables. How do I shrink those down? Is there an admin function I can use?
Dear Victor
This might be totaly unrelated but I had some SQL Database that had a lot of free space reserved.
After I BACKUP my database I run this script
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
Will fill the transaction protocol so you need space and be able to delete the transaction protocol but it helps me to free unused space.
Not sure if this is for older SQL Servers or working in current ones as well.
Markus
Hello Markus,
Thank you for the shared solution.
@Keat, you can also take a look on that article.
Regards,
Svetoslav Manchev
Telerik