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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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.
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

695 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