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