Cross-database ownership chaining is a SQL Server security feature allowing database users access to other database objects hosted on the same SQL server instance, in the case where database users don't have access granted explicitly
Two examples of situations where cross-database ownership occurs.
1) A database view joining data from tables residing on multiple databases
2) A stored procedure accessing multiple database objects but at the same time restricting access to the underpinning tables
How do I check my cross DB ownership chaining ?
SELECT is_db_chaining_on, name FROM sys.databases;
To enable for an individual database
ALTER DATABASE [MY_DATABASE_NAME] SET DB_CHAINING ON
Use this command to enable cross-database ownership chaining in all databases
USE master; GO EXECUTE sp_configure 'show advanced', 1; RECONFIGURE; EXECUTE sp_configure 'cross db ownership chaining', 1; RECONFIGURE;
Read more on SQL Security
How to get user security changes with SQL default trace