• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Globally renaming table name,constraint names,stored proc names

Hello,

I am using MS SQL Server 2005. Is there a way I can rename all the say if all my table names,stored procs etc are prefixed by xxxxxxx can I rename it by yyyyyy globally?

pls help
0
sureshraina
Asked:
sureshraina
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
you need to change the ownership
use sp_changeObjectOwner
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Speed Ferret (http://www.moshannon.com, free limited 30-day trial, $199 buy) allws you to change text globally in  Visual Basic, SQL Server, and Access all at the same time.

Hope this helps.
-Jim
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Sorry, leave my previous comments. I thought of changing the ownerships
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
imran_fastCommented:
use this command
==============


CREATE SCHEMA yyyyyy

ALTER SCHEMA yyyyyy TRANSFER xxxxxxx.TableName;
GO
0
 
sureshrainaAuthor Commented:
Thanks imran.

But will this change in all the stored procedures,constraints,tables,views,functions???
0
 
imran_fastCommented:
Yes you can transfer any object.


ALTER SCHEMA yyyyyy TRANSFER xxxxxxx.object_name
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now