Export XML Data to FileStream Data

  • Hello everyone

    I hope explain well my issue, we have a table with xml field data, each record is more that 1 Mb, and the application are presenting slow, we believe that we could change this record to Filestream with varbinary(max), someone have idea to make this, how to export data from XML to Filestream, we are making some experiments but if you have a idea we'll be very thankful for you help, thanks and sorry for my english

    That have a nice day.;-):-D

    Angel Miranda Nieto
    DBA Specialist, BI, MCSA SQL Server

  • Thank you for reading my question, and what we decided, we create a table with the filestream field and migrate the information with a convert, I show them the script, Greetings :rolleyes:

    CREATE TABLE [dbo].[FSAvaluoTest02]

    (

    [Id] [uniqueidentifier] ROWGUIDCOL PRIMARY KEY,

    [ClaveSHF] [uniqueidentifier] NULL,

    [NumeroSerieUV] [varchar](50) NULL,

    [NumeroSerieValuador] [varchar](50) NULL,

    [NumeroSerieControlador] [varchar](50) NULL,

    [IdXSD] [uniqueidentifier] NULL,

    [XMLAvaluo] VARBINARY(MAX) FILESTREAM not NULL, -----*********

    [FirmaValuador] [text] NULL,

    [FirmaControlador] [text] NULL,

    [FechaAlta] [datetime] NOT NULL,

    [Contrarecibo] [text] NULL,

    [ReciboCancelacion] [text] NULL,

    [Estatus] [int] NULL,

    [RespuestaFovissste] [text] NULL,

    [XSDVersion] [varchar](50) NULL

    ) FILESTREAM_ON FSAvaluos01

    GO

    Insert into FSAvaluoTest02

    select Id,ClaveSHF,NumeroSerieUV,NumeroSerieValuador,NumeroSerieControlador,IdXSD

    ,convert(varbinary(max),XMLAvaluo),FirmaValuador,FirmaControlador,FechaAlta,Contrarecibo,ReciboCancelacion

    ,Estatus,RespuestaFovissste,XSDVersion from datAvaluoTest

    Angel Miranda Nieto
    DBA Specialist, BI, MCSA SQL Server

  • You can also check out this article to export of XML data: https://msdn.microsoft.com/en-us/library/ms191184.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply