| Author |
Message |
gsuttie
Joined: 30 Nov 2005 Posts: 44 Location: Glasgow, Scotland
|
Posted: Thu Nov 11, 2010 4:28 pm Post subject: Bug perhaps - not sure whats going on |
|
|
If I have say 100 tables in my list of tables within SQL Management Studio and I choose one in the middle of the list and choose to design the table, I then add a column and click save - on the left hand pane (list of tables) the name of the table I just changed is no longer there - I know that if I then refresh the list of tables it comes back but its slightly worrying when the table looks likes it just been deleted - is this dropping the table to recreate it and thats why the names dissappears form the ilst of tables?
Cheers
Gregor |
|
| Back to top |
|
 |
markv
Joined: 06 Jul 2010 Posts: 14
|
Posted: Fri Nov 12, 2010 5:30 pm Post subject: |
|
|
In SSMS it will not drop a table unless you have the "Allow DROP" option ticked with in the preferences. Also, the only time it will drop a table and recreate is if there is a need to.
Adding a new column to the end of the database table does not but if you drag it around to place it in a specific column order this will. Also, other options you specify as part of the column may cause a drop.
The best way to see this is by either keeping the Allow Drop option disabled or generating a script of the changes before applying them. If the script creates a temporary table then inserts data from the existing table, it is going to be dropping and recreating. |
|
| Back to top |
|
 |
eddie davis
Joined: 14 Jun 2006 Posts: 796 Location: Red Gate Software
|
Posted: Mon Nov 15, 2010 1:03 pm Post subject: |
|
|
Thank you for your post into the forum.
SQL Source Control makes use of the SQL Compare engine. When synchronizing two databases using SQL Compare, a table rebuild is required when the column order has changed to preserve the data in the table to be synchronized.
Therefore if you add a column to a table and you force the column order, so that the new column is added between existing columns, this will require a table re-build in the manner you have described.
Many Thanks
Eddie _________________ Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com |
|
| 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