July 20, 2010 at 12:52 pm
Hi,
I want to rename the table without using a stored procedure.
Possible solution:
Create copy of the old table and give it a new required name. Drop the old table.
Is there any other optimized way to rename the table?
Amrata Agrawal
July 20, 2010 at 12:59 pm
July 20, 2010 at 1:19 pm
Hi,
1. Using Stored Procedure requires permission .
Only the members of the sysadmin fixed server role, the db_owner fixed database role, or the owner of the object can execute sp_rename.
2. Renaming table using sp_rename does not renames all the references made to the table.
3. Out of curiosity.
July 20, 2010 at 1:51 pm
Please stop with the random bolds ... really annoying.
However you rename the table you are going to need to take care of the references to the table. Personally, I would probably script out the new table and data insertions and then update all the dependencies. There are 3rd party tools that make all of this much easier.
July 20, 2010 at 1:53 pm
I guess, You cannot change table name with out permissions, though there is a way to change table name other than sp_rename..
🙂
July 20, 2010 at 4:32 pm
amrata88 (7/20/2010)
Hi,1. Using Stored Procedure requires permission .
Only the members of the sysadmin fixed server role, the db_owner fixed database role, or the owner of the object can execute sp_rename.
2. Renaming table using sp_rename does not renames all the references made to the table.
3. Out of curiosity.
I'd be curious as to why you want to rename a table but don't have permissions to do so. The only way to do this correctly without permissions is to get the System DBA involved.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply