Ownership chaining is broken if the Execute command is enclosed in parentheses characters ("( )") in SQL Server 2000 (887267)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

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 ("( )").

MORE INFORMATION

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 ("( )").

REFERENCES

Additional information about ownership chaining is available in SQL Server 2000 Books Online. The following topics address ownership chaining:
  • Using Ownership Chains
  • Backward Compatibility for Cross-Database Ownership Chaining
  • sp_dboption
  • Setting Configuration Options
To download SQL Server 2000 Books Online, visit the following Microsoft Web site: For additional information about ownership chaining and cross-database ownership chaining, click the following article numbers to view the articles in the Microsoft Knowledge Base:

810474 Cross-database ownership chaining behavior changes in SQL Server 2000 Service Pack 3

813849 Enabling cross-database ownership chaining for Notification Services databases


Modification Type:MajorLast Reviewed:1/17/2005
Keywords:kbinfo KB887267 kbAudDeveloper