The DBO of SQL Server

Source: Internet
Author: User

  background

When we execute SQL query statements, we automatically add such an identity to the table name,


So why would you add the dbo? What is dbo?

  about dbo? Definition  

The DBO (dbo----database owner) is a user with implied permissions to perform all activities in the database. Maps any member of the sysadmin fixed server role to a particular user within each database called dbo. In addition, any objects created by any member of the sysadmin fixed server role automatically belong to the dbo.

? Example  

If the user UserA is a member of the sysadmin fixed server role and creates the table T1, the table T1 belongs to the dbo and to the dbo. T1 instead of usera.t1 to qualify. Conversely, if UserA is not a member of the fixed server role sysadmin, but is a member of the db_owner for the fixed database role, and the table T1 is created, T1 belongs to UserA and is limited to USERA.T1. The table belongs to UserA because the member does not qualify the table as dbo. T1.

  That is, by defining the object with the dbo as the owner, you can make any user reference in the database without having to provide the owner name.

? Benefits  

We know that the owner of a database object, whether it is a table, stored procedure, view, or the like, is the user who created it. It's so that the permissions and so on are all belong to that user. If other users want to reference and so on, must add the relevant prefix, which creates a lot of unnecessary trouble, and may cause the problem of the wrong, cause the program confusion and error, so the point of the problem is only a small knowledge point, so set its permissions is the DBO will provide us a lot of convenience.

The DBO of SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.