July 15, 2011 at 3:28 am
Hi,
I want to generate the database scripts into XML format (not data in the tables ..only scripts of a particular database). Can you please let me know any procedure or too available for it. I am using SQL Server 2008.
Thanks
IVLN.
July 15, 2011 at 6:55 am
from TSQL, it's very difficult; there's no native way to get the scripts in TSQL; most people end up calling something else that calls SMO via xp_cmdshell, and brings it back into a table.
I've made a prototype procedure in the past that scripts tables in TSQL, but you'd still have to get the results into a table and produce the XML...and will the SQL-formtted xml be what you are looing for?
Powershell or a programming language would be easier to do; both can consume or create XML very easily.
Lowell
July 15, 2011 at 7:24 pm
NLV (7/15/2011)
Hi,I want to generate the database scripts into XML format (not data in the tables ..only scripts of a particular database).
I can't help because I don't even know how to spell "XML" but would you do me a favor please? Please tell us why you'd want to do such a thing instead of just using good ol' ASCII text? Thank you for your time.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply