?
Solved

Change table ownership

Posted on 2007-07-24
10
Medium Priority
?
589 Views
Last Modified: 2012-05-05
I am using SQL Server Management Studios to create tables in my database. Is there a way (without scripting) to create a table as "dbo.TableName" instead of "myUser.TableName". Also, is there a way to change the ones that are already created?
0
Comment
Question by:strickdd
  • 2
  • 2
  • 2
  • +4
10 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 19556163
Would this help?

Change schema name on Tables and Stored procedures in SQL Server 2005
http://weblogs.asp.net/steveschofield/archive/2005/12/31/434280.aspx

Bob
0
 
LVL 7

Expert Comment

by:natloz
ID: 19556181
you can simply specify the owner on creation with

create table dbo.tblName
(
   varField varchar(50)
)
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 19556201
You can specify the desired owner during the creation itself

CREATE Table dbo.TableName ( .... )

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 28

Author Comment

by:strickdd
ID: 19556618
I don't think any of you caught that I do not want to do this with a script. I would like to do this with the graphical interface.
0
 
LVL 7

Expert Comment

by:natloz
ID: 19556640
Then you need to be logged in as SA
0
 
LVL 15

Expert Comment

by:crisco96
ID: 19556649
I know you can use SQL Studio 2000 to do this, not sure about 2005
0
 
LVL 28

Author Comment

by:strickdd
ID: 19556667
Like Crisco said, I know you can do this in SQL studio 2000 without being an SA. Logically you would think you could do it in the new version.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 19556696
SQL Server Management Studio does not have an option to change the table owner/schema through the interface.

Bob
0
 
LVL 1

Accepted Solution

by:
rawlinpa earned 2000 total points
ID: 19556724
strickdd,

When you are in design view on the table, go to the properties window (usually on the right-hand side). Under "Schema", select your owner there. Or you could just script it.
0
 

Expert Comment

by:Steve_Eggleston
ID: 34713500
This solution worked great for me
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

850 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