I have 2 circuits, and one of the objects in the first circuit must access the object in the other circuit. For instance:
CREATE VIEW I.ITest
AS
SELECT 1 as TestColumn
GO
CREATE VIEW O.OTest
AS
SELECT * FROM I.ITest
GO
EXEC ('SELECT * FROM O.OTest') AS USER = 'TestUser'
DROP VIEW O.OTest
DROP VIEW I.ITest
In the above example, TestUser only has access to the "O" schema. Thus, the choice itself works fine, but since the view makes a choice from another “I” circuit, then it fails with an error:
SELECT permission was denied for the ITest object, the MyDB database, schema I.
To get around this, I can provide the “O” schema permission to access the “I” schema, but it doesn’t sound that way and looks like a circuit permission bypass.
What can be done? Am I doing all this wrong? What is the best practice in this scenario?
thank
UPDATE. db, , dbo, db . , dbo , db, db , . .