How to copy the databse Schema via a Job

  • I have a production server with a database that the user vendor program allows them to alter the schema (add new colums and tables),

    Note this production server is on a privet virtual lan.

    I need to create a Job that will generate a script to create the full database script for this database, them I will have the Backup group move this file to the QA server in another virtual lan.

    All I need is the new schema in QA server not the data. This will allow me to duplicate the ever changin schema.

    Note: the data base in production is cleared and repopulated by the user every day.

  • This was removed by the editor as SPAM

  • Is the data a big deal? If not, use backup/restore. This is the simplest, cleanest and easiest.

    Alternatively, you can script this with SQL-DMO and access the generate script for the db and then apply that on your other db, but it will be a full script, not a differential. From a differential perspective, you'd need to control the changes manually or use Profiler to capture the DDL being run.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

  • Quick and dirty try scptxfr.exe of MS.

    Found it under Program Files\Microsoft SQL Server\MSSQL\Upgrade, SQL 2000.

    Scheduled a job from TSQL and add file to VSS one can get a bit of a view of the historical changes.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply