Solved

After renaming a column in SQL Server 2008, the name doesn't change in table design view

Posted on 2013-12-30
14
721 Views
Last Modified: 2013-12-30
Once I rename a column in a table by using sp_RENAME (as below), I can see that the name has changed when I view the table in 'edit all rows' mode, but it still has the old column name in design view. I refresh the table - and even the database - but the column still has the old name in design view. Only when I close and reopen SSMS has it updated.

sp_RENAME 'TableName.OldColumnName' , 'NewColumnName', 'COLUMN'
0
Comment
Question by:TimHudspith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
14 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39745832
Seems like a Refresh issue, can you kindly refresh the table after altering the column name and try opening it in designer again.
0
 

Author Comment

by:TimHudspith
ID: 39745925
Well, I've tried it again and now it seems to be behaving as it should. I can't explain it.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39745931
Yes, it seems like a Refresh issue only.
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

Author Comment

by:TimHudspith
ID: 39745934
So is SQL Server known to be a bit temperamental in this respect? Something I should get used to?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39745941
Actually it is not like that, SQL Server considers everything as a Session.
Object explorer is a session and your query window where you edited the table is a session.
Changes done in one session is not visible to the other session unless the other session refreshes it.
So, refreshing the object explorer will reflect the changes done for tables in other sessions.
0
 

Author Comment

by:TimHudspith
ID: 39745963
I've just added a column to a table and still have the same problem. I immediately went to the Object Explorer, selected the table, right-clicked, refreshed, then opened in Design view, but the new column was not added. By contrast it IS visible when I view the table via the 'edit all rows' option.
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39745983
I've tried it in my local with SQL Server 2008 SP3 installed and SQL Server 2008 R2 SP2 and it works fine without any issues. Can you kindly confirm whether you have the latest SP's installed for your instance and if not apply the latest SP's and try once..
0
 

Author Comment

by:TimHudspith
ID: 39746000
How do I determine which SP I have?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39746021
Try running this in your query window and it will tell the Service pack details.

select SERVERPROPERTY('productlevel')
0
 

Author Comment

by:TimHudspith
ID: 39746031
The result is SP1.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 39746050
If that is the case, can you try applying SP3 for SQL Server 2008 from the link below and check once.
http://www.microsoft.com/en-in/download/details.aspx?id=27594
0
 

Author Comment

by:TimHudspith
ID: 39746056
I have Windows 7. Which one do I download?

SQLServer2008SP3-KB2546951-IA64-ENU.exe
SQLServer2008SP3-KB2546951-x64-ENU.exe
SQLServer2008SP3-KB2546951-x86-ENU.exe
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 39746118
Hope you would be having a 64 bit machine, if that is the case then SQLServer2008SP3-KB2546951-x64-ENU.exe else SQLServer2008SP3-KB2546951-x86-ENU.exe
0
 

Author Comment

by:TimHudspith
ID: 39746196
That seems to have done it. Thanks.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question