Sql Source Control - get list of changes to database

all, if I have added a database to source control and then update a view, there will be visual cues that the view has changed. So my question is this, is there a way, by a command line to get a list of any changes to the database?
Tagged:

Answers

  • Hi there,

    Thank you for reaching out.

    Unfortunately, this type of functionality is not available through the command line.
  • @dpimentalIf you own a license to SQL Compare Pro you can run the CLI to compare the database with the scripts folder (using the /database1 and /scripts2 switches as described here), which will show you any differences, which can be saved as a report. How are you hoping to use the list?
    David Atkinson
    Product Manager
    Redgate Software
  • dpimentaldpimental Posts: 2 New member
    Here's our situation. We use Git but we haven't as yet added sql server database objects to Git. That is changing now. However, we only want to add views, functions and stored procedures to Git. And I can query the database for any changes / additions to a database and the plan would be to run a script to do the adds / commits after that.

    I would like some technical support with both Sql Source Control and Flyway. I know you know longer support sql source control.

    My goal would be to add a database's views, functions and stored procedures to Git. Then run a Windows Scheduler which calls a PowerShell script. The script would do the following ...

    1. Run a query against sys.objects to see recent changes to the database.
    2. Call the command to add / commit the latest changes in the database to our Git repository using either Redgate Sql Source Control or Redgate Flyway.
    3. Get the latest version of the repository and pull it down to the local repository.
    4. Send out email notifications about changes in the database that have been committed to git.

    Can you have one of the technical support staff contact me for some help on this?
    Thanks.

Sign In or Register to comment.