0

We can generate the scripts for all database objects manually but I want to automate this process. Is there anyway to generate scripts at a specific interval of time or can we set a job to execute to generate scripts in SQL Server 2012?

4
  • 1
    Please explain what kind of script you would like to automate? DDL or DML? Or both? Commented Jul 15, 2019 at 9:46
  • OT - dba would be a better fit. Commented Jul 15, 2019 at 9:53
  • Possible duplicate of stackoverflow.com/questions/19434545/…. The PowerShell script can be scheduled via a SQL Agent job. Commented Jul 15, 2019 at 10:12
  • You can use SqlPackage.EXE to generate a .dacpac if that is acceptable. Like any command line tool it can be scheduled in SQL Agent. Commented Jul 15, 2019 at 10:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.