简体   繁体   中英

Dump sql server 2008 database to XML

I need a full dump of my SQL server database in one large XML file. I need to get all the tables, except on some tables I need to exclude specific columns, (columns with raw data).

How can I do this?

I am using SQL server 2008 R2.

Never tried it, but I believe you can use the bulk export option of bcp :

From SQL Server Books on-line:

"E. Bulk exporting XML data The following example uses bcp to bulk export XML data from the table that is created in the preceding example by using the same XML format file. In the following bcp command, and represent placeholders that must be replaced with appropriate values:

bcp bulktest..xTable out a-wn.out -N -T -S<server_name>\<instance_name>

"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM