username instead of dbo while creating the table

Posted on 2011-03-02
Last Modified: 2012-05-11

This is on continuation to the Q that the link refers to:
When the user is trying to create a is showing as [username].[tablename] instead of [dbo].[tablename]
Question by:anilkullam
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
  • 5
  • 2
  • 2
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 250 total points
ID: 35016447
you have to specify
CREATE TABLE dbo.tablename
to get dbo as owner.
other wise, it will be the username as default.

unless the username has the db_owner role, in that case, the default is dbo indeed, and not the username

Author Comment

ID: 35016687
yeah i did conveyed the same to the user, but since they are running DTS packages wherein some tables are created (it is here that the schema is becoming a problem) and when comparing it with tables with dbo schema the dts is failing....previously when the users complained that they were not able to see jobs in the server, I have added the user under msdb targetserverrole n nothing else...
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35016780
so, in the DTS, they have to prefix the table names also by the schema name ...
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

LVL 50

Expert Comment

ID: 35016897
what have you got the users default schema set to?


Author Comment

ID: 35017054
nothing...they were existing users on the server....prefixing the names to the DTS i think no...they were just executing them and no inputs and it is after getting the error  that they can get to know that something is wrong

Author Comment

ID: 35017280
how do I change schema for this particular user in sql server 2000.
starting 2005 we will be able to do this the following way but I need to do it in SQL Server 2000... help guys
USE AdventureWorks2008R2;

Author Comment

ID: 35033168
@lowfatspread:Im not sure if we can set default schema in sql server 2000 since schema is introduced in 2005, however can u pls share ur views on the same

Also sorry for the extended delay
LVL 50

Assisted Solution

Lowfatspread earned 250 total points
ID: 35037132
sql 2000 no i don't think you can either...

what are your users creating tables for?

why give them that ability?

Author Closing Comment

ID: 35110068
finally I gave admin rights since they were also part of the group and guess it fixed the prob since they didnt complain further and also with sa rights the schema will be default as dbo even in sql server 2000.

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

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.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

734 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