Subject: Save database schema to XML file
Posted By: brettk_1 Post Date: 11/4/2004 6:50:49 AM
Can anyone tell me if and/or how it is possible to save the schema of a database to an xml file, meaning the structure and not the records themselves.

Any help would be greatly appreciated.

Thanks.

Brett Kelly

Reply By: mehdi62b Reply Date: 11/4/2004 3:42:28 PM
Hello,
you can simply produce your xml and it's schema,(the schema saves in a XSD file not XML)

objDataSet.WriteXml("C:\\...\\file.xml");//your XMLFile
objDataSet.WriteXmlSchema("C:\\...\\schema.xsd");//your Schema

if you encounter some errors about access control you should change the permissions and roles of your user where you make your result files.

--------------------------------------------
Mehdi.
Reply By: sks1607 Reply Date: 9/16/2006 4:27:04 AM
Hello,

I am looking for the similar requirement....

I have 2 Hosting servers (say HostSvr1 and HostSvr2), on which i have installed sql servers 2000 and 2005 as follows...

HostSvr1 has Sql Server 2000 installed in which i have database (DB1).

HostSvr2 has Sql Server 2005 installed in which i have no databases.

Note:- both the HostSvrs are in the same domain (say MyDomain.Net)

Now, what i want is, to some how copy DB1 into Sql Server 2005.

is there some solution to do so.....

either by vbscript, javascript, visual basic, or c# code.

If there is some solution or hint/tips please reply to me with that....


Regards
Sharad Sjarma (KAPS)



Go to topic 49844

Return to index page 173
Return to index page 172
Return to index page 171
Return to index page 170
Return to index page 169
Return to index page 168
Return to index page 167
Return to index page 166
Return to index page 165
Return to index page 164