How To Automatically Script SQL Server: 'Generate Scripts' for SQL Database

Posted by skimania on Stack Overflow See other posts from Stack Overflow or by skimania
Published on 2010-02-10T13:55:37Z Indexed on 2010/04/02 11:33 UTC
Read the original article Hit count: 339

Filed under:
|
|
|
|

I want to run scheduled nightly exports of my database code into my SVN source.

It's easy to schedule automated check-in's into svn from a folder, but scheduling the export from SQL in SQL Management Studio is

Right click target database, choose Tasks > Generate Scripts.

Follow the wizard and presto you've got scripts in a folder.

Is it possible to extract a single script that the wizard generates, and stuff that into a stored proc which I can run nightly?

Ideas?

© Stack Overflow or respective owner

Related posts about sql

Related posts about svn