?
Solved

Globally renaming table name,constraint names,stored proc names

Posted on 2006-04-21
6
Medium Priority
?
257 Views
Last Modified: 2012-08-13
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
Comment
Question by:sureshraina
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16510767
you need to change the ownership
use sp_changeObjectOwner
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 16510780
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
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16510789
Sorry, leave my previous comments. I thought of changing the ownerships
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 28

Expert Comment

by:imran_fast
ID: 16513863
use this command
==============


CREATE SCHEMA yyyyyy

ALTER SCHEMA yyyyyy TRANSFER xxxxxxx.TableName;
GO
0
 

Author Comment

by:sureshraina
ID: 16514664
Thanks imran.

But will this change in all the stored procedures,constraints,tables,views,functions???
0
 
LVL 28

Accepted Solution

by:
imran_fast earned 2000 total points
ID: 16519289
Yes you can transfer any object.


ALTER SCHEMA yyyyyy TRANSFER xxxxxxx.object_name
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

749 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