Mgmnt Studio change schema name.

Please outline the steps Using Management Studio for SQL 2005.


How do I change the schema name for a database?

I want the tables to appear as mychosenname_xxx instead of dbo_xxx



LVL 9
VolibrawlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ptjcbCommented:
It is a two step process in script. One to create the schema, the second to transfer the table. You would have to do this for every table that you want to transfer. You may also authorize a different user (rather than dbo). You can read more about it under CREATE SCHEMA and ALTER SCHEMA in books online.

CREATE SCHEMA mychosenname_xxx AUTHORIZATION dbo;

ALTER SCHEMA mychosenname_xxx TRANSFER dbo.Address;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VolibrawlAuthor Commented:
So, like my other question, there is no tool in Management Studio to do this either?

I have to write 2 scripts for each of the 50 tables?
0
VolibrawlAuthor Commented:
Excuse me, 1 script for each of the tables.
0
The Ultimate Tool Kit for Technolgy Solution Provi

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 for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

ptjcbCommented:
No, no tool in SMS to create and transfer. Schema is new to SQL 2005 (it was the owner in 2000), so there are new rules and situations. Manipulating schemas requires T-SQL.

0
VolibrawlAuthor Commented:
OK, can't be done, huh?

The more I use this Management Studio, the more I find I can't do any of the things I want to do with it.

Thanks anyway..


0
va2505Commented:
SQL 2005 SMS   has tool to create and transfer Schema.
1. To create new Schema go to Security-Schemas (add new)
2. To rename schema.:
2.1 First you need activate Property window  just click F4 (or select from  Menu - View - Properties Window)
2.2 Then right click on table name and select Design. Design window is opened and you can change schema  name in properties window.  Don't forget TO SAVE it. Click on save button   :)

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.