Print Thread
Accessing objects from another schema
#66803 05/19/25 01:38 PM
Joined: May 2011
Posts: 66
L
Member
OP Offline
Member
L
Joined: May 2011
Posts: 66
Hi,

I'm logged to the database as userA with quite wide privileges, and creating a view for userB using the SQL Window:
SQL Query
create or replace view userB.test_view as
select id
from test_table;

Assuming test_table is owned by userB this view could be compiled successfully. But, when right-clicking on the "test_table" (no mater before or after compilation) PL/SQL developer doesn't recognise the test_table as the database object. It only changes if I change the code to:
SQL Query
create or replace view userB.test_view as
select id
from userB.test_table;

Could you fix it?


Best regards,
Lukasz
Re: Accessing objects from another schema
Lukasz Indeka #66805 05/19/25 04:18 PM
Joined: Mar 2025
Posts: 5
M
Member
Offline
Member
M
Joined: Mar 2025
Posts: 5
Why do you think the current behaviour is incorrect? If i understood it properly - it is perfectly aligned with the visibility rules - if you as userA run the query "select id from test_table" - you'll either get error, because the table is in another schema? For that reason, you can't right click on the unqualified object and expect some context menu appear in the plsql developer, because the object is currently for you not visible.
But, maybe i have not understood your requirement...

Best regards

Maxim

Re: Accessing objects from another schema
Lukasz Indeka #66889 06/13/25 10:39 AM
Joined: May 2011
Posts: 66
L
Member
OP Offline
Member
L
Joined: May 2011
Posts: 66
You're right. My idea was that if I prepend test_view with the userB schema name, then PL/SQL Developer should see objects like I was logged in with userB privileges. When I thought about it again, this is a very bad idea.


Best regards,
Lukasz

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.266s Queries: 14 (0.183s) Memory: 2.5055 MB (Peak: 3.0397 MB) Data Comp: Off Server Time: 2025-06-14 13:29:58 UTC
Valid HTML 5 and Valid CSS