tags:

views:

3660

answers:

3

At least on my local instance, when I create tables, they are all prefixed with "dbo.". Why is that?

+8  A: 

dbo is the default schema in SQL Server. You can create your own schemas to allow you to better manage your object namespace.

Daniel
As a best practice, I always add the "dbo." prefix even though it is not necessary. Most of the time in SQL it's good to be explicit.
SurroundedByFish
+7  A: 

If you are using Sql Server Management Studio, you can create your own schema by browsing to Databases - Your Database - Security - Schemas.

To create one using a script is as easy as (for example):

CREATE SCHEMA [EnterSchemaNameHere] AUTHORIZATION [dbo]

You can use them to logically group your tables, for example by creating a schama for "Financial" information and another for "Personal" data. Your tables would then display as:

Financial.BankAccounts Financial.Transactions Personal.Address

Rather than using the default schema of dbo.

Sohnee
+1  A: 

http://www.google.com/search?q=sql+server+dbo:


What is database owner (dbo) in SQL Server 2000? -uCertify
What is database owner (dbo) in SQL Server 2000?, The database owner (dbo) is a user that has implied permissions to perform all activities in a SQL Server ... www.ucertify.com/.../what-is-database-owner-dbo-in-sql-server-2000.html - Cached - Similar

SQL DBO SQL Server Database Object Owner dbo
6 Apr 2008 ... There are two "dbo" in SQL Server, one is Database Owner and one is Database Object Owner, dbo is a user with permissions to perform all ... www.sqldba.org/.../17-SQL-DBO-SQL-Server-Database-Object-Owner-dbo.aspx - Cached - Similar

SQL Server Security Cribsheet
However, the old 'SA' login and 'DBO' user were kept for backward-compatibility. SQL Server 2005 has introduced more complexity, such as password policies ... www.simple-talk.com/sql/.../sql-server-security-cribsheet/ - Cached - Similar

what is dbo in sqlserver? - SQL - Programming
5 posts - 3 authors - Last post: 22 Nov 2005 whenever i type sql queries into sql server and i look at them after - it prefixes a lot of things with 'dbo' - what is that?thank you. forums.whirlpool.net.au/forum-replies-archive.../431174.html - Cached - Similar

etc...

Tiberiu Ana