SQL Express fills up

avatar

Hi all,

We have a SQL Database for our datastore.

Two month ago the database was filled up because the dbo.UserInfoHistory eat all the space.

I purge the table dbo.UserInfoHistory and now the database has growed to the maximum space again.

How can I prevent this behavior.

Kind Regards,

Bernd

All Comments (3)

avatar

Hello bernddausch,

Thank you for reaching out to the Devolutions support team.

If the table size is getting bigger, it's usually because your users use the override information on entries.
The best practice is to set the session information as inherited and configure your override on the folder level.

You can run this Query in SQL to know precisely why this table is so significant:

WITH DataMetrics AS (
    SELECT 
        CONVERT(date, ModifiedDate) AS [Date],
        ISNULL(DATALENGTH(Data), 0) / 1024.0 AS DataSizeKB,
        ISNULL(DATALENGTH(UserSettings), 0) / 1024.0 AS UserSettingsSizeKB,
        ISNULL(DATALENGTH(PersonalConnections), 0) / 1024.0 AS PersonalConnectionsSizeKB,
        ISNULL(DATALENGTH(ConnectionOverridesSafe), 0) / 1024.0 AS ConnectionOverridesSizeKB
    FROM dbo.UserInfoHistory
)
SELECT TOP 60
    COUNT(*) AS [Count],
    [Date],
    
    -- Total Data (KB)
    SUM(DataSizeKB + UserSettingsSizeKB + PersonalConnectionsSizeKB + ConnectionOverridesSizeKB) AS [TOTAL Data (KB)],

    -- Data Column Statistics
    AVG(DataSizeKB) AS [Avg Data (KB)],
    MIN(DataSizeKB) AS [Min Data (KB)],
    MAX(DataSizeKB) AS [Max Data (KB)],
    SUM(DataSizeKB) AS [Sum Data (KB)],

    -- UserSettings Column Statistics
    AVG(UserSettingsSizeKB) AS [Avg UserSettings (KB)],
    MIN(UserSettingsSizeKB) AS [Min UserSettings (KB)],
    MAX(UserSettingsSizeKB) AS [Max UserSettings (KB)],
    SUM(UserSettingsSizeKB) AS [Sum UserSettings (KB)],

    -- PersonalConnections Column Statistics
    AVG(PersonalConnectionsSizeKB) AS [Avg Old User Vault (KB)],
    MIN(PersonalConnectionsSizeKB) AS [Min Old User Vault (KB)],
    MAX(PersonalConnectionsSizeKB) AS [Max Old User Vault (KB)],
    SUM(PersonalConnectionsSizeKB) AS [Sum Old User Vault (KB)],

    -- ConnectionOverridesSafe Column Statistics
    AVG(ConnectionOverridesSizeKB) AS [Avg User Overrides (KB)],
    MIN(ConnectionOverridesSizeKB) AS [Min User Overrides (KB)],
    MAX(ConnectionOverridesSizeKB) AS [Max User Overrides (KB)],
    SUM(ConnectionOverridesSizeKB) AS [Sum User Overrides (KB)]
    
FROM DataMetrics
GROUP BY [Date]
ORDER BY [Date] DESC;


Also, we do not mention how important data is, and I strongly suggest a full database backup before executing this query.

Best regards,

Patrick Ouimet

avatar
Hello bernddausch,

Thank you for reaching out to the Devolutions support team.

If the table size is getting bigger, it's usually because your users use the override information on entries.
The best practice is to set the session information as inherited and configure your override on the folder level.


Hi Patrick,

I run the Script and you are right, the Storage usage is from User Overrides.

How can I check what the User Overrides? In my Case on Row hast 50000 characters in the Connection Overrides Safe.

We inherit the settings from the folder. But for Linux VMs each User has is own User-Safe with his own Credentials.
This Setting also is Inherited from the parent Folder.

Kind Regards,

Bernd

avatar

Hello bernddausch,

For further investigation, I suggest having a look during a session with one of our agents.

You can send an email to service@devolutions.net

Best regards,

Patrick Ouimet