Is it possible to overwrite the same disk address in a T-SQL update statement? A use case would be preventing recovery of the original text on disk for security or anonymity reasons.
CREATE TABLE Test(
Id int,
Message nvarchar(1000))
GO
INSERT INTO Test (Id, Message) VALUES (1, 'Hello!')
GO
So at this point, 'Hello!' is written to disk. If an update statement is run, can it be guaranteed (or at least highly likely) to overwrite the same location on disk?
UPDATE Test SET Message = '000000' WHERE Id = 1
GO
In the SQL Server implementation, what is the probability that the original 'Hello!' value will no longer be on disk?
I'm assuming the new value would be the same size. My guess is that if the new value were of a different size, then SQL Server would write the updated value to a new location, leaving the 'Hello!' in the original location, but now marked as free. I also assume that a delete does nothing to the original value on disk, but just marks the location as free.
If this is not the case, or not guaranteed, or at least highly-likely, Is there another way to remove the value from disk?
The requirement here is not to the level of keeping government secrets safe. It's more of a marketing claim that deleted items are truly gone and can't be recovered.
I understand there are a lot of caveats here. I know the SQL language does not address this. I'm asking specifically about SQL Server's implementation. The answer could be that it's unknowable. Just wondering if there's documentation, or common knowledge, or if someone has tested implementation specifics.
We're using a hosting service that doesn't encrypt the SQL Server disk. We do encrypt the value before writing to the db. Just looking into a 'belt and braces' solution.