Saving entire database in Source Control

mar1jxmmar1jxm Posts: 5
Hi!

Is there any way to save an entire database in Source Control?

Thank you for your help

Jacob

Comments

  • Including the data? Why would you want to do this? You can specify small static data tables to source control, but you wouldn't ordinarily source control transactional data.
    David Atkinson
    Product Manager
    Redgate Software
  • Thank you for your reply - I need just Code - procs, views, functions.etc
  • The answer is yes. Are you having problems getting this working?
    David Atkinson
    Product Manager
    Redgate Software
  • David,

    I just do not know how to do it. Could you please point me to the right direction?

    Thanks,

    Jacob
  • All objects will be source controlled by default. You don't have to specify them.

    Create an empty folder in your source control repository, and link your database to this repository. Visit the 'Commit' tab, type in a comment and click 'Commit'.

    That's all there is to it!

    David
    David Atkinson
    Product Manager
    Redgate Software
  • Yes, I did that, but history did not show anything.
    I guess I will see it only if I make a modification? right?
  • You should see it in the history after you did the first commit. At the very least you should see a folder structure which has a subfolder for each object type that exists (Tables, Stored Procedures, Views etc).

    Are you sure you're looking at the right place in the source control client? How are you viewing the history? Does the history in SQL Source Control show you anything? (right click in the Object Explorer and select Show History)

    David
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.