简体   繁体   中英

to store a large text into db2 database column

I have an error trace which i need to populate into a text file for every case.The problem is the error trace is more than 3000 character while the column in which its storing is var char(2500).I cannot change the size of the column.That is restricted.Is there any way in which i can store large amount of text into a column of small size and convert it back while putting the error trace back to file.

I am using DB 2 and java.

SO is there any thing in which i can store some kind of object of error trace in the column and convert it back while putting it into file

For most practical purposes the answer is NO, just as the comments above said.

If you are able to program it, there is a conceivable solution, but it is probably NOT one I would recommend in most scenarios. You could send your data to a zip routine, or some other compression function. But everyplace that tabe is used would then have to know when and how to decompress only the records you compresses.

This would rarely be a good solution, and the fact that you say you cannot change the definition of this column, only indicates this more.

You should find or create another place to store this info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM