Sergio, I have not found any query or technique that would automatically calculate the used/remaining space. However, since the number of columns in a snapshot is relatively small, it wouldn't take much effort to generate a query that calculates the current size for a given row., This query would add constant values for some columns based on data type and then use the len() function for VARCHAR columns (nvarchar would be x2 as it's double-byte). For those columns defined as nvarchar(max), the usage is constant: 24 bytes. Then this query when run would identify each row by business/primary key and specify the total byte usage based on the calculated value. The SQL would need to be updated any time the snapshot table changed.
-Brian
------------------------------
Brian Zupke | Senior Technical Support Engineer
Winshuttle North America | 9099009179
------------------------------
Original Message:
Sent: 05-21-2021 12:57
From: Sergio Rojas
Subject: Snapshot 8060 byte limitation
@Brian Zupke,
A while back we had a conversation related to snapshots. Among the topics we talked about was the 8060 byte limitation. We discussed making large VARCHAR fields at least 4000 to force them to be stored as nvarchar(max), reducing their footprint to 8 or 16 bytes of the 8060. We have a repository (profile) which has a large number of attributes, and we are looking at adding about 50 more.
Is there a way for us to check how much of the 8060 bytes we are currently using?
------------------------------
Sergio Rojas | IT Manager
McNichols Company | 813-282-3838 x2421
------------------------------