The XML column data stored in the data file generated by using bcp -n is in two different formats. one is storing the actual length of the data prefixed by an 8 byte length infront of the data; the other one whithout the prefixed length but "FEFFFFFFFFFFFFFFFC030000" infront of the data.
Could any body please tell me what the binary means?
Thanks,
Lijie
In native mode, the length prefix for xml data is of 8 bytes. There are 3 variations of this length:
a) If it's 0xFFFFFFFFFFFFFFFF then the column value is NULL
b) If it's 0xFFFFFFFFFFFFFFFE (FEFFFFFFFFFFFFFFF in little endian), that means the data is stored as chunks, so following this length indicator there will be chunks of xml column data with 4 bytes length prefix and then chunk data and so on, until a chunk is hit whose length is specified by 0x00000000 indicating end of column data.
c) Length prefixed data, for any value other than (a) and (b) this indicates the actual length of data.
Thanks
Waseem Basheer
SDE - Data Programmability Group
Microsoft Corp.
No comments:
Post a Comment