I am using SQL Server 2000 on my database servers and I would just like to back up the db schemas on one of the secondary servers to save tape space. Can anyone tell me what the SQL script is to dump the Schema to a text file?
T-SQL doesn't provide a direct way to script a database. You can use SQL DMO. See SQL BOL and the Microsoft website for details about SQL DMO.
I have some VBA modules usin SQL DMO that I execute from Access to script our SQL databases. I send the code to you if you are interested. I hope to convert the modules to VB script soon so I can run scripting jobs on each server.
There is a freeware product called "SQL DevPro" which is supposed to provide scripting. I just installed it but have had difficulty getting it to work on one of my databases. You may want to download and try it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.