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
197 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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now