Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Exporting XML File to FTP Site

Author  Topic 

Jgries
Starting Member

17 Posts

Posted - 2011-12-01 : 21:26:32
I'm having difficulty understanding what I need to do to move an XML file to an FTP site. I can move the file over manually if I'm able to extract the file from MSSMS. Part of my problem is that the file is so large, about 1.2GB, that I keep getting this error:

Unable to show XML. The following error happened
Exception of type System.outofmemoryexception

Here is the script I'm using.

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED


SELECT
P.ProjectName AS [@ProjectName],
P.ProjectCity AS [@ProjectCity],
P.ProjectState AS [@ProjectState],
[@ArchName] = (SELECT CompanyName + ', '
FROM dbo.Company AS C
WHERE C.ProjectID = P.ProjectID
FOR XML PATH('')),
DT.DocumentText
FROM dbo.DocumentText AS DT
JOIN dbo.DocumentProperty AS DP
ON DT.DocumentPropertyID = DP.DocumentPropertyID
JOIN dbo.Project AS P
ON DP.ProjectID = P.ProjectID
FOR XML PATH ('Doc')

I'm a bit of a novice here, any help would be appreciated.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-02 : 00:56:28
are you trying to generate XML from table data? if yes, use bcp with queryout option to get details onto a XML document and then use SSIS FTP task to do the ftp.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -