Skip to content

Commit 1793811

Browse files
OKafka Permissions (#1135)
Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
1 parent eb435eb commit 1793811

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

code-teq/okafka-lab/oraclefree/grant_permissions.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
-- Set as appropriate for your database.
22
alter session set container = freepdb1;
33

4-
-- user for okafka
4+
-- user for okafka. You may modify tablespace grants as appropriate.
55
create user TESTUSER identified by testpwd;
66
grant create session to TESTUSER;
77
grant resource, connect, unlimited tablespace to TESTUSER;
88

99
-- okafka permissions
10+
-- AQ User role to be able to use AQ
1011
grant aq_user_role to TESTUSER;
12+
-- To be able to invoke operations from AQ-JMS
1113
grant execute on dbms_aq to TESTUSER;
14+
-- To be able to create transactional event queue and subscriber
1215
grant execute on dbms_aqadm to TESTUSER;
16+
-- To be able to discover other RAC nodes of the database
1317
grant select on gv_$session to TESTUSER;
1418
grant select on v_$session to TESTUSER;
1519
grant select on gv_$instance to TESTUSER;

code-teq/okafka-lab/src/main/java/com/example/okafka/CreateTopic.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static void main(String[] args) {
2525
.all()
2626
.get();
2727
System.out.println("[ADMIN] Created topic: " + testTopic.name());
28+
System.out.println("[ADMIN] Created transactional topic: " + transactionalTestTopic.name());
2829
} catch (ExecutionException | InterruptedException e) {
2930
if (e.getCause() instanceof TopicExistsException) {
3031
System.out.println("[ADMIN] Topic already exists");

0 commit comments

Comments
 (0)