Mgmnt Studio change schema name.

Posted on 2007-04-10
Last Modified: 2008-01-09
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

Question by:Volibrawl
  • 3
  • 2
LVL 27

Accepted Solution

ptjcb earned 250 total points
ID: 18884428
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.


ALTER SCHEMA mychosenname_xxx TRANSFER dbo.Address;

Author Comment

ID: 18899825
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?

Author Comment

ID: 18899831
Excuse me, 1 script for each of the tables.
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

LVL 27

Expert Comment

ID: 18907389
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.


Author Comment

ID: 19003563
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..


Expert Comment

ID: 22922945
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   :)


Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now