| Author |
Message |
mar1jxm
Joined: 10 Oct 2012 Posts: 4
|
Posted: Wed Oct 10, 2012 8:51 pm Post subject: 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 |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Wed Oct 10, 2012 10:51 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
mar1jxm
Joined: 10 Oct 2012 Posts: 4
|
Posted: Wed Oct 10, 2012 10:58 pm Post subject: |
|
|
| Thank you for your reply - I need just Code - procs, views, functions.etc |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Wed Oct 10, 2012 11:03 pm Post subject: |
|
|
| The answer is yes. Are you having problems getting this working? |
|
| Back to top |
|
 |
mar1jxm
Joined: 10 Oct 2012 Posts: 4
|
Posted: Wed Oct 10, 2012 11:27 pm Post subject: |
|
|
David,
I just do not know how to do it. Could you please point me to the right direction?
Thanks,
Jacob |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Wed Oct 10, 2012 11:42 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
mar1jxm
Joined: 10 Oct 2012 Posts: 4
|
Posted: Wed Oct 10, 2012 11:52 pm Post subject: |
|
|
Yes, I did that, but history did not show anything.
I guess I will see it only if I make a modification? right? |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1080
|
Posted: Wed Oct 10, 2012 11:56 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|