Size limit of XML variable in SQL Server 2008

I’m passing XML into a stored proc. I know the max size of the internal binary representation of an XML document is 2GB. But does this limit also apply to xml variables that be held in memory while the sproc runs?

[EDIT] Is the 2GB limit still relevant to SQL Server running in 64-bit mode which can use up to 7 terabytes of RAM? [EDIT]


Yes it is the same as I read this.

You can store xml instances in a column, or a variable of xml type


The stored representation of xml data type instances cannot exceed 2 gigabytes (GB) in size.

Highlights is done by me.

Update The limit is the same for 64-bit OS.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s