-
Notifications
You must be signed in to change notification settings - Fork 61
Remove DBMS_LOCK grant from shared setup; keep it only for 11g #243
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -84,6 +84,9 @@ jobs: | |||||
| - name: Create database user | ||||||
| run: | | ||||||
| ./ci/setup_accounts.sh | ||||||
| - name: Grant execute on DBMS_LOCK for Oracle 11g | ||||||
| run: | | ||||||
| echo "GRANT EXECUTE ON DBMS_LOCK TO hr;" | sqlplus system/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME} | ||||||
|
||||||
| echo "GRANT EXECUTE ON DBMS_LOCK TO hr;" | sqlplus system/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME} | |
| echo "GRANT EXECUTE ON DBMS_LOCK TO hr;" | sqlplus "sys/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME} as sysdba" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| create user hr identified by hr; | ||
| alter user hr identified by hr account unlock; | ||
| grant dba to hr; | ||
| grant execute on dbms_lock to hr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step may not actually fail the workflow if the GRANT errors. SQLPlus commonly exits with status 0 unless instructed otherwise, so an ORA- error (e.g., insufficient privileges) could be missed and the job would proceed. Consider running SQL*Plus with a script that includes
whenever sqlerror exit sql.sqlcode;(and an explicitexit;) so the step reliably fails on grant errors.