I've got to write a test that requires large amounts of data to be stored in a text column.
When I try this (insert 2 billion X characters):
INSERT INTO table VALUES ( REPLICATE('X', 2000000000) )
This is what I get:
SELECT *, DATALENGTH(textCol) FROM table
XXXXXXXXXXXXX.... 8000
I was hoping for more than 8000. Any ideas where I'm going wrong? My google-fu is failing me.
Caveat: Yes, text columns are deprecated. I'm sure there are lots of very valid and sensible reasons why it's a bad idea to want to use them as bulk data stores. Assume I'm dealing with a legacy system that happens to have text columns storing large amounts of bulk data and I have to write tests to figure out how my bit of third party code can deal with that.