Microsoft KB Archive/887267

= Ownership chaining is broken if the Execute command is enclosed in parentheses characters (&quot;&quot;) in SQL Server 2000 =

Article ID: 887267

Article Last Modified on 11/14/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-





INTRODUCTION
In Microsoft SQL Server 2000, chaining is honored when one procedure calls another procedure by using an Execute command. Chaining is not honored if the Execute command is enclosed in parentheses (&quot;&quot;).



Ownership chaining
By default, all database objects have owners. When an object such as a view, a stored procedure, or a user-defined function references another object, an ownership chain is established. For example, the following conditions are true:
 * A table is owned by a user.
 * The same user owns the source object. The source object may be a view, a stored procedure, or a user-defined function.
 * The user also owns all target objects. These objects may be underlying tables, views, or other objects.

When these conditions are true, the ownership chain is said to be unbroken. With SQL Server 2000 Service Pack 3 (SP3) and later versions, if the Cross DB Ownership Chaining configuration option is off, all the objects must be in the same database to avoid breaking the ownership chain. When the ownership chain is unbroken, SQL Server checks permissions on the source object but not on the target objects.

In SQL Server, chaining is honored when one procedure calls another procedure by using an Execute command. However, the chain is broken if the Execute command is enclosed in parentheses (&quot;&quot;).

