Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Column Name Changes
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

17 Posts

Posted - 10/15/2012 :  09:55:56  Show Profile  Reply with Quote

we recently moved our database from one version to another version.
we are planning to do column name changes to most of the fields. is there a way i can do using a script.

Please recommend some ideal case on how to go with this approach

Flowing Fount of Yak Knowledge

5155 Posts

Posted - 10/15/2012 :  10:38:10  Show Profile  Reply with Quote
You can use sp_rename function to change column name.

Changing from one version of SQL Server to another should not require you to do any column name changes. Is there some other reason why you want to do that? If you change the names, any references to those columns in views, stored procedures etc. would need to be changed. So it is a process that requires lot of care, attention and testing.
Go to Top of Page

Aged Yak Warrior

885 Posts

Posted - 10/15/2012 :  10:38:34  Show Profile  Visit lionofdezert's Homepage  Send lionofdezert a Yahoo! Message  Reply with Quote
For this purpose we use RedGate SmartRename, which is part of SQL Refector tool.It will rename all reference objects in a smart way, to ensure database integrity.

Go to Top of Page

Starting Member

17 Posts

Posted - 10/15/2012 :  11:19:53  Show Profile  Reply with Quote
its not changing one version of sql server to another...its wrt application and hence lot of column names has to be changed in the new database.

is there a tool which compares two databases and do the column name changes..even a script will help my purpose
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000