September 9, 2011 at 7:33 am
HowardW (9/9/2011)
Tried it out, also can't find a work-around (can't rename in the UI either). The only option I can find is to script the table, recreate it as the correct name, migrate data over then drop the misnamed one
I was able to do it in SSMS.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
September 9, 2011 at 7:35 am
Welsh Corgi (9/9/2011)
HowardW (9/9/2011)
Tried it out, also can't find a work-around (can't rename in the UI either). The only option I can find is to script the table, recreate it as the correct name, migrate data over then drop the misnamed oneI was able to do it in SSMS.
What version? I can't rename it in SSMS - it just runs sp_rename with the object type parameter populated and gets:
Msg 15248, Level 11, State 1, Procedure sp_rename, Line 321
Either the parameter @objname is ambiguous or the claimed @objtype (OBJECT) is wrong.
on 2008 and 2005...
September 9, 2011 at 7:45 am
I could have swored I did this last night (early morning) but I got an error. :w00t:
2008.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
September 9, 2011 at 7:48 am
What I would suggest as a work around would be to script out the table and modify it to the new name.
Then load it via a query or the SSIS wizzars
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
September 9, 2011 at 7:55 am
Read above. You can't even select from the renamed table. It's incredibly difficult to get the data somewhere else in any way
September 9, 2011 at 8:03 am
ops. Your suggestion to restore from a backup is good.
I would restore to a non-production server and load the table via SSIS.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply