Ivan. I read the issue about ts-74, ts-88.
I think. You must have had a hard time. hahaha

anyway
To sum up.

u want to save attachment directly to Database.
so they explained about changing upload way in attachment-context.xml. so simple. u don't need to change any source code.

And then
You tried to change and upload test is successfully.
and download is also good.
Right?

I saw  your test data in ESAATTH table. My test result is also same.
The data you tested, right?
anyway, worked well.

But still you wonder.
1. in database mode, when the new attachment is saved in DB,
Are upload files directly saved without physical saving?
My answer is Yes. When I tried testing. It was not saved in the upload directory path that specified in file.properties.
It's saved directly to db.

2. then, how do i existing uploaded file? Isn't it necessary to migrate from physical file to db? right! Yes. needs migration.
so they explained about converting logic by java.
The problem is that this source code is partial of needed for migration. only explaind about reading uploaded physical file and convert to byte data.

I think.
The migration code will be consisted of the below sequential.
1. connect sqlserver
2. retrieve ESAATTH.ATT_FILE_PATH
3. reading uploaded physical file of path from previous procedure and convert to byte data.
4. update ESAATTH <- i don't know how.
5. if necessary. deleting uploaded physical file.
6. repeat for all attachement data in ESAATTH.
7. close db connection.

I find other way like below link.
https://www.sqlshack.com/upload-multiple-images-sql-server/

but when i tried, It didn't work well. The file data was broken.
If the DB server and the WAS server are physically separated.
There may be network problems as well.

Finally
My answer is 'We should migrate by using java'.
lol

That's what I figured out.
Have you solved any questions?

Let's find a way. refer to below link.
http://www.srikanthtechnologies.com/blog/java/uploadimagetoblob.aspx