| Author |
Message |
JasonR
Joined: 13 Oct 2011 Posts: 6
|
Posted: Thu Oct 13, 2011 11:35 pm Post subject: Renaming a source-controlled DB |
|
|
| What is the best method for renaming a database that is source controlled? |
|
| Back to top |
|
 |
DavidSimner
Joined: 04 Feb 2010 Posts: 12
|
Posted: Sat Oct 15, 2011 4:43 pm Post subject: |
|
|
If you mean renaming the database on SQL server, then the best way is:
1. make sure that both the commit tab and the get latest tab are empty by committing all your outstanding changes and gettting all of your teammates
2. on the setup tab, right-click on the URL where it's linked to and click copy
3. on the setup tab, unlink the database from source control
4. rename the database
5. on the setup tab, link it to the same location (you can paste the URL that you copied above)
6. visit the commit tab and wait for the spinny to finish (you should see the spinny say "Accepting updates from source control" which is where it determines that your database is already fully up-to-date with no changes to commit or get, and we sort out our internal data structures to reflect this)
At this point you should be done. Let me know if you have any problems. |
|
| Back to top |
|
 |
JasonR
Joined: 13 Oct 2011 Posts: 6
|
Posted: Mon Oct 17, 2011 2:38 pm Post subject: |
|
|
Thanks for the reply. You were correct -- I did mean to ask how to change a database's name in SQL Management Studio while retaining its source control history.
Your process worked like a charm. Note that each user needs to re-link the database to the source control system after the name change. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group