Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Ownership hardcoding

Author  Topic 

maxismclaren
Starting Member

5 Posts

Posted - 2003-03-03 : 11:30:28
Maybe it's just a matter of style, but I've seen:

<database>..<object>

--OR--

<database>.dbo.<object>

Is there any difference in maintenance/performance (with and without ownership chaining on) between these two?

JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2003-03-03 : 12:30:35
If the referencing user is dbo then the two methods should be identical. When an object owner is not specified SQL Server checks for ownership in the following order: 1. Owned by the current user, 2. Owned by dbo. If the object is owned by the dbo and the referencing user is not a member of the db_owner role SQL Server can eliminate the first check by specifying dbo as the object owner. So owner qualification would be preferred.

Justin

Expect 0x80040106
Go to Top of Page
   

- Advertisement -