Re: SQLXMLBulkLoad Question (Please help)
- From: "LeeH" <LeeH@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 4 May 2005 14:58:05 -0700
Thanks for the response!
Are you confirming that this is a bug in XmlBulkload?
We are using XmlBulkload because we distribute large subsets of data from a
corporate database to multiple remote client databases. There is one xml
file generated for each table (130+ tables) and these xml files are zipped
and sent to remote client sites via dial-up modem.
We send database changes as XML files generated via dataset WriteXml which
produces the correct values for nulls, empty strings and spaces.
If you do a ReadXml into a dataset using the same XML file as input, the
dataset also contains correct values for nulls, empty strings and spaces. In
addition, if you process XML in TSQL using sp_xml_preparedocument and OPENXML
these values are preserved correctly. I do expect XmlBulkload to be
consistent with these other types of XML processing in handling nulls, empty
strings and spaces. If your export process exports data a certain way then
your import process should process data by the same rules or you get corrupt
data.
Please note that our production xml file frequently contains more than 1
million rows per table, hence the need for fast processing by SqlXmlBulkLoad
at the remote client sites.
To create a CDATA section for every character type column on every table
seems like a lot of daily processing overhead for each column of each table
for 1000 target clients.
"Bertan ARI [MSFT]" wrote:
> For Bulkload, the only way to preserve Empty String and whitespaces in an
> element content is using CDATA. Otherwise whitespaces and empy content will
> be ignored by Bulkload.
>
> Creating a CDATA section is trivial. If you are using XmlTextWriter from
> ..Net, just use StartCDATA function. If you are using Native MsXml, use the
> "startCDATA" funtion on ISAX:LexicalHandler.
>
> I am also curious why you are using XmlBulkload to migrate data from one
> database to another one while there are other dedicated tools for this like
> DTS.
>
> Thanks.
>
>
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "LeeH" <LeeH@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:781C7712-2DFE-4378-8D59-9168BD19E34F@xxxxxxxxxxxxxxxx
> > lhayes@xxxxxxxxxxxxxxx
> >
> > "MSSQLServerDeveloper" wrote:
> >
> > > Lee - Whats an email address for you?
> > >
> > > "LeeH" wrote:
> > >
> > > > Thanks for the input!
> > > > Again I don't think defaults are an issue. I want to preserve Nulls,
> Empty
> > > > strings AND Blank Spaces. I'm moving data from a table in one
> database to a
> > > > table in another database and expect the data in the destination table
> to be
> > > > exactly as the source table.
> > > >
> > > > "Dennis Redfield" wrote:
> > > >
> > > > > 0) CDATA is certainly an option which does work. I think we should
> raise
> > > > > the issue of how to get WriteXML to do this (and the place to post
> that
> > > > > question is into one of the DOTNET newsgroups)
> > > > > 1) Set your defaults in the database not in the XSD file, the matrix
> of how
> > > > > SQL Server handles nulls and defaults is complex and deserves
> attension to
> > > > > BOL to get it right.
> > > > >
> > > > > dlr
> > > > >
> > > > > "LvBohemian" <LvBohemian@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > > > > news:4CE33848-EE1A-4040-BD00-E01E0CBF7E66@xxxxxxxxxxxxxxxx
> > > > > > <sometag>
> > > > > > <![CDATA[This section is not type checked and may solve your
> > > > > problem]]>
> > > > > > </sometag>
> > > > >
> > > > >
> > > > >
>
>
>
.
- Follow-Ups:
- Re: SQLXMLBulkLoad Question (Please help)
- From: Bertan ARI [MSFT]
- Re: SQLXMLBulkLoad Question (Please help)
- References:
- SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: Graeme Malcolm
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: MSSQLServerDeveloper
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: MSSQLServerDeveloper
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: MSSQLServerDeveloper
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: MSSQLServerDeveloper
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: LvBohemian
- Re: SQLXMLBulkLoad Question (Please help)
- From: Dennis Redfield
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: MSSQLServerDeveloper
- Re: SQLXMLBulkLoad Question (Please help)
- From: LeeH
- Re: SQLXMLBulkLoad Question (Please help)
- From: Bertan ARI [MSFT]
- SQLXMLBulkLoad Question (Please help)
- Prev by Date: Re: SQLXMLBulkLoad Question (Please help)
- Next by Date: Best approach to creating an annotated schema?
- Previous by thread: Re: SQLXMLBulkLoad Question (Please help)
- Next by thread: Re: SQLXMLBulkLoad Question (Please help)
- Index(es):
Relevant Pages
|