We help IT Professionals succeed at work.

Renaming Schema in SQL Server 2008

r_pat72
r_pat72 asked
on
Medium Priority
2,862 Views
Last Modified: 2012-08-13
Hi,

I wanted to change the schema of my database objects from "emp" to "employee".

How can I do this using scripts. Also "emp" schema is refrerred in storedprocedure and views. Is there any quick way to change to new schema "employee" in those existing storedprocedure and views.

Thanks in advance.
Comment
Watch Question

Database Consultant
CERTIFIED EXPERT
Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Chris LuttrellSenior Database Architect
CERTIFIED EXPERT

Commented:
Red Gate has a refactor tool. I have not tried a schema yet, but you may want to check it out. www.red-gate.com

Author

Commented:
ALTER SCHEMA emp TRANSFER employee is for single object. But if i want to update for all objects at a time is there any procedure or method. Please let me know.

Chris LuttrellSenior Database Architect
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.