Hey folks,
I am looking for a way to export the DDL for table objects from MS SQL 2K. In EM you can right click a table, select "All Tasks" then "Generate SQL". When you preview the script, you can copy it to the text editor of your choice and save it. I'd like to find a way to do this programatically - either through TSQL commands or DTS would be best. I'm OK to do VBScript w/in DTS but I'm not up to writing a full blown VB app.
I seem to remember in my Sybase days that there was a utility called "defncopy" that could be used to extract DDL but there seems to be no analogue in MS SQL 2K.
The purpose of all this is to extract the data and schema of a table in ASCII text so that we can zip it and burn to CD for archiving purposes.
Any help appreciated!You need version control if your db is in such a state of flux...
but that's just my own opinion (MOO)|||Originally posted by Brett Kaiser
You need version control if your db is in such a state of flux...
but that's just my own opinion (MOO)
Brett - nothing here to indicate "a state of flux" simply we need to be able to extract and archive the structure and data within these tables. We are archiving data that has gone stale and attempting to reduce the utilization on our hard drives. Unfortunately the restrictions of our industry require us to keep the data for a long period of time even if it is not "live".
Stick to the technical question at hand, MOO elsewhere please.|||Follow the Nigel's script from this link http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=32519 to create the script.|||Originally posted by Satya
Follow the Nigel's script from this link http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=32519 to create the script.
Thank you this seems like it will do the trick or serve as a basis for moddification.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment