Scripting all database objects?greenspun.com : LUSENET : SQL Server Database Administration : One Thread
I've got a question that no one seem to be able to answer. How can i schedule a job to script all the objects in my database? Is it possible to create a script for it?
-- Anonymous, February 22, 2001
There are two ways you can do this.
1. Schedule a CmdExec jobstep launching c:\mssql7\upgrade\scptxfr.exe (You may have it somewhere else. On SQL Server 2000 the file name is the same, but the directory is different.) The command would be like this:
/d pubs /I /f c:\pubs.sql
2. You can also create a VB Script and schedule that using the Active/X jobstep using SQL-DMO to script out the database. That is what is used by scptxfr.exe.
-- Anonymous, February 24, 2001