Answer the question
In order to leave comments, you need to log in
How to export DB from SQL Server to Xml file?
You need to export the test database from SQL Server to an Xml file. Attempts to find a solution myself using the tools of SQL Management Studio did not lead to anything. I tried to convert both via bulk and via FOR XML, but they only allow you to convert each table separately, and I need to export the entire database into one file, besides, this xml database sometimes needs to be updated, due to a change, albeit rare class structures in the project. Tell me in which direction to dig, preferably using C # or Python
Answer the question
In order to leave comments, you need to log in
Something like this:
declare @s nvarchar(max) = ''
select @s = @s +
'select * from '+TABLE_NAME+' for xml auto;'
from INFORMATION_SCHEMA.TABLES
exec (@s)
For a schema with single file data, there is a data-tier application export .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question