0

I have .bak format file with database from another company. After a long time of configuration SQL Server I have access to this data but Is there any way to export all database to XML format? Is there easiest way than export every table by typing:

SELECT * from MLS.dbo.Offers

FOR XML AUTO

1 Answer 1

1

Not an exact answer but following SQL will help you to list down all the schema and table names. And you can build a dynamic SQL thing around this result set to achieve what you want.

SELECT DISTINCT
       DB_NAME() AS [Database],
       SCHEMA_NAME(SCHEMA_ID) AS [Schema],
       Name AS [Table]
FROM sys.tables
ORDER BY 1,2;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.