Skip to content

Missing Grant Permissions for sys.v_$diag_alert_ext in grant_permissions.sql #207

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

Closed
4Aiur opened this issue Apr 2, 2025 · 0 comments · Fixed by #208
Closed

Missing Grant Permissions for sys.v_$diag_alert_ext in grant_permissions.sql #207

4Aiur opened this issue Apr 2, 2025 · 0 comments · Fixed by #208

Comments

@4Aiur
Copy link
Contributor

4Aiur commented Apr 2, 2025

Problem:

In alertlog.go

from v$diag_alert_ext

the application attempts to execute SELECT against SYS.V_$DIAG_ALERT_EXT.

However, the docker-compose/oracle/grant_permissions.sql script does not include the necessary GRANT SELECT statement for the pdbadmin user to access this view.

grant select on sys.aq$_queue_shards to pdbadmin;

This discrepancy results in three error occurrences upon docker-compose startup, as the application lacks the required permissions to query the view.
logger.Info("Failed to query the alert log three consecutive times, so will not try any more")

Steps to Reproduce:

  1. docker compose up
  2. Observe the application logs for errors related to querying SYS.V_$DIAG_ALERT_EXT.
observability-exporter  | time=2025-04-02T00:45:35.414Z level=INFO source=alertlog.go:40 msg="Log destination file does not exist, will try to create it: /log/alert.log"
observability-exporter  | time=2025-04-02T00:45:35.577Z level=ERROR source=alertlog.go:113 msg="Error querying the alert logs" !BADKEY="dpiStmt_execute: ORA-00942: table or view \"SYS\".\"V_$DIAG_ALERT_EXT\" does not exist"
observability-exporter  | time=2025-04-02T00:45:50.416Z level=ERROR source=alertlog.go:113 msg="Error querying the alert logs" !BADKEY="dpiStmt_execute: ORA-00942: table or view \"SYS\".\"V_$DIAG_ALERT_EXT\" does not exist"
observability-exporter  | time=2025-04-02T00:46:05.415Z level=ERROR source=alertlog.go:113 msg="Error querying the alert logs" !BADKEY="dpiStmt_execute: ORA-00942: table or view \"SYS\".\"V_$DIAG_ALERT_EXT\" does not exist"
observability-exporter  | time=2025-04-02T00:46:20.413Z level=INFO source=alertlog.go:29 msg="Failed to query the alert log three consecutive times, so will not try any more"

Expected Behavior:

The grant_permissions.sql script should include the following SQL statement to grant the pdbadmin user the necessary permissions:

grant select on sys.v_$diag_alert_ext TO pdbadmin;
4Aiur added a commit to 4Aiur/oracle-db-appdev-monitoring that referenced this issue Apr 2, 2025
Signed-off-by: 4Aiur <14359997+4Aiur@users.noreply.github.com>
4Aiur added a commit to 4Aiur/oracle-db-appdev-monitoring that referenced this issue Apr 2, 2025
Signed-off-by: 4Aiur <14359997+4Aiur@users.noreply.github.com>
markxnelson pushed a commit that referenced this issue Apr 4, 2025
* Add Missing Grant Permissions (#207)

---------

Signed-off-by: 4Aiur <14359997+4Aiur@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant