all groups > sql server programming > august 2007 >
You're in the

sql server programming

group:

Import using openrowset limitation of 2mb


Import using openrowset limitation of 2mb Nikolajus
8/21/2007 11:32:01 PM
sql server programming:
Hello!

I need to import 6.5MB .xml file in SQL Server 2005.

So, I've created a table:
create table eb_main_itemvalues_xml (id int, v xml)

And executed command:
insert into eb_main_itemvalues_xml (id, v)
select 2, *
from openrowset (
bulk 'C:\eb_main_itemvalues_export.xml',
single_blob) as x

Insert works OK (no errors, no warnings), but in the table field v is
inserted only 2MB of data (instead of 6.5). Whats wrong?

Thanks in advance
RE: Import using openrowset limitation of 2mb ML
8/22/2007 1:28:05 AM
[quoted text, click to view]

How have you verified this? Is the XML instance stored in SQL different from
the original instance in any way?


ML

---
Matija Lah, SQL Server MVP
RE: Import using openrowset limitation of 2mb Nikolajus
8/22/2007 11:40:03 PM
[quoted text, click to view]

Checked it one more time again and... there is no problem with imported XML
size. Thanks!

The actual problem (apart that I'm new to MS SQL :) ) was when I tried to
view my huge XML in Managamenet Studio by clicking on result grid field. As I
RE: Import using openrowset limitation of 2mb ML
8/23/2007 1:22:01 AM
[quoted text, click to view]

Not quite true. Go to Tools/Options and under Query Results/SQL
Server/Results to grid change the XML data option to Unlimited.


ML

---
Matija Lah, SQL Server MVP
AddThis Social Bookmark Button