Skip to main content
1 of 2
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?

Harald
  • 423
  • 1
  • 5
  • 6