Skip to content

Commit 1fd7a61

Browse files
yahondaclaude
andcommitted
Use DBMS_SESSION.SLEEP instead of DBMS_LOCK.SLEEP where available
DBMS_SESSION.SLEEP (available since Oracle 18c) does not require a separate grant from SYS, unlike DBMS_LOCK.SLEEP. Remove the blanket "grant execute on dbms_lock to hr" from the shared user setup SQL. The spec already uses DBMS_SESSION.SLEEP on Oracle 18c+ and falls back to DBMS_LOCK.SLEEP on older versions. Add the DBMS_LOCK grant only to the 11g workflow which still needs it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 464c728 commit 1fd7a61

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/test_11g.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ jobs:
8484
- name: Create database user
8585
run: |
8686
./ci/setup_accounts.sh
87+
- name: Grant execute on DBMS_LOCK for Oracle 11g
88+
run: |
89+
echo "GRANT EXECUTE ON DBMS_LOCK TO hr;" | sqlplus system/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME}
8790
- name: Disable ActiveRecord for TruffleRuby
8891
run: |
8992
echo "NO_ACTIVERECORD=true" >> $GITHUB_ENV
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
create user hr identified by hr;
22
alter user hr identified by hr account unlock;
33
grant dba to hr;
4-
grant execute on dbms_lock to hr;

0 commit comments

Comments
 (0)