How can we help you today? How can we help you today?

Saving entire database in Source Control

Hi!

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

Thank you for your help

Jacob
mar1jxm
0

Comments

7 comments

  • David Atkinson
    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
    0
  • mar1jxm
    Thank you for your reply - I need just Code - procs, views, functions.etc
    mar1jxm
    0
  • David Atkinson
    The answer is yes. Are you having problems getting this working?
    David Atkinson
    0
  • mar1jxm
    David,

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

    Thanks,

    Jacob
    mar1jxm
    0
  • David Atkinson
    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
    0
  • mar1jxm
    Yes, I did that, but history did not show anything.
    I guess I will see it only if I make a modification? right?
    mar1jxm
    0
  • David Atkinson
    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
    0

Add comment

Please sign in to leave a comment.