Skip to main content
edited tags
Link
Paul White
  • 95.7k
  • 30
  • 440
  • 691
Question Unprotected by Paul White
Question Protected by Kin Shah
Tweeted twitter.com/#!/StackDBAs/status/422388706763628544
Post Migrated Here from stackoverflow.com (revisions)
Source Link
Harald
  • 423
  • 1
  • 5
  • 6

SQL Server 2012: Generate Scripts from command line

I am running SQL Server 2012.

The SQL Server Management Studio has the option to right click on a database then select Tasks and Generate Scripts.

Is there a way to automate that via command line somehow?

I want to create a script that includes the schema and data of the entire data base.

Tools like ScriptDB and sqlpubwiz.exe all seem to target SQL Server 2005. What about SQL Server 2012?