Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL 2005 import export wizard, where is the XML option, if not there how do i do it....?

Posted on 2009-07-01
5
Medium Priority
?
207 Views
Last Modified: 2013-11-10
I have a number of tables I need to output, no format changes, no row changes just a simple output to xml, i have the SQL server Server Import & Export wizard open but cannot find an XML option.... Am I missing something...? If not how on earth does one do it. I am an SQL novice and an even bigger XML novice...
0
Comment
Question by:HolmeRose
  • 3
  • 2
5 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 2000 total points
ID: 24752852
this command will give you result in XML, you can use that in BCP to get file save in your disk.

SELECT *
FROM AdventureWorks.Person.Contact
WHERE LastName LIKE 'A%' ORDER BY LastName, FirstName
FOR XML AUTO, TYPE, XMLSCHEMA, ELEMENTS XSINIL
0
 

Author Comment

by:HolmeRose
ID: 24753965
Hi there, many thanks for this. I have added my own query text and run it in Studio but it keeps crashing as it runs out of memory. The table has over 170,000,000 records. Can I dump it direct to an XML file..?

Where do I find the BCP - I am a bit of a novice and have never stepped out of SQL Studio....

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24753985
well BCP is not an issue, you have to run it in DOS mode but the main thing right now is that, you won't be able to dump all those records together in XML, you have to make small chunk and export it.
0
 

Author Comment

by:HolmeRose
ID: 24756557
Why can they not be in one record...? There is plenty of drive space (over 2TB on my data drive and plenty of RAM 8GB)
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24760208
only hard drive and RAM are not the factor, so many other things also affects it, your log size, your processor's capacity etc.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question