Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error querying suites info when installed without public synonyms #957

Closed
michaelstaszewski opened this issue Jun 24, 2019 · 2 comments

Comments

@michaelstaszewski
Copy link

commented Jun 24, 2019

Using 3.1.7, but I don't believe this is a new issue.

I've followed the install guide to install privately into a schema, UT3, and I've allowed access to another schema, UT_USER. My installation process is...

@create_utplsql_owner.sql ut3 ut3 users
@install.sql ut3

CREATE USER ut_user IDENTIFIED BY ut_user;
GRANT "CONNECT" TO ut_user;
GRANT "RESOURCE" TO ut_user;
ALTER USER ut_user DEFAULT ROLE "CONNECT", "RESOURCE";

@create_user_grants.sql ut3 ut_user;
@create_user_synonyms.sql ut3 ut_user;

When connected as UT_USER I can run suites OK, but I cannot query for them using get_suites_info.

Query

  SELECT t.*
    FROM TABLE (
             ut_runner.get_suites_info (a_owner => user, a_package_name => null))
         t

Exception

ORA-00904: : invalid identifier
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 821
ORA-06512: at "UT3.UT_RUNNER", line 201
ORA-06512: at line 1

@jgebal jgebal added the bug label Jun 24, 2019

@jgebal jgebal added this to the v3.1.8 milestone Jun 24, 2019

@jgebal

This comment has been minimized.

Copy link
Member

commented Jun 24, 2019

Thanks for reporting this issue @michaelstaszewski
Looks like grants are missing for suite cache tables when using non-public grants.
You would need to add those to the installation:

grant select on &&ut3_owner..ut_suite_cache to &ut3_user;
grant select on &&ut3_owner..ut_suite_cache_package to &ut3_user;
grant select on &&ut3_owner..ut_suite_cache_schema to &ut3_user;

I'm currently working on improving utPLSQL security and privileges model so it's possible that those grants will go away totally in next release.

@jgebal

This comment has been minimized.

Copy link
Member

commented Jun 24, 2019

I've replicated the issue locally and provided a permanent fix for it in PR #954
If you want, you can use the code in that PR for now.
The changes will become part of v3.1.8.

Sorry for inconvenience.

@jgebal jgebal closed this in ae3326f Jun 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.