SQL Server technical details (how to modify the table owner)

Source: Internet
Author: User

SQL Server technical details (how to modify the table owner)

 

Hello everyone, I haven't written a blog after six months. First, I became lazy because I had a daughter-in-law. Second, there is always no theme that can be written. Coincidentally, yesterday, because I had to change the table owner, I had a lot of things and lost my temper. The object was a manager.

 

Peak return, question:

SQL server table owner concept: in fact, the biggest significance of the table owner is that it can refine the permissions in the database to the table.

[Dbo]. [studentTable], the full name of this table, where [dbo] is what I call the table owner. The database administrator can use dbo to refine the table permissions. Such as read, write, and query permissions.

 

When creating a new table, if no batch table owner is specified, the system automatically adds the default table owner ([dbo]) to the table. How can we change it to the owner we need ?? The statement is as follows:

Statement: alter schema stu TRANSFER [dbo]. [studentTable]

Explanation: Change the owner dbo of the studentTable table to stu.

MSDN: http://msdn.microsoft.com/zh-cn/library/ms173423.aspx

 

Conclusion: This is just a simple detail statement, but it is often ignored.

Make an import: it is because I changed the table owner that all the ing generated through EF Power Tool has an error. It's like an ant in a hot pot. I want to know what will happen later and listen to the next lecture.

"How does EF cope with table owner change"

 

Thank you. Jerry bailing

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.