Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thospfuller/f2127f0097130892cc1a04b4a4ea6f8c to your computer and use it in GitHub Desktop.
Save thospfuller/f2127f0097130892cc1a04b4a4ea6f8c to your computer and use it in GitHub Desktop.
An example of the preconditions required in order to run the DatabaseChangeListenerInOracleDatabaseExample.groovy script.
--
-- This is required otherwise notifications won't be sent to the JDBC driver.
--
grant change notification to system;
commit;
CREATE TABLE example(
example_id NUMBER(10) PRIMARY KEY,
phrase VARCHAR2(120) NOT NULL
);
commit;
insert into example values (1, 'one');
insert into example values (2, 'two');
insert into example values (3, 'three');
insert into example values (4, 'four');
insert into example values (5, 'five');
commit;
--
-- Then once the DatabaseChangeListenerInOracleDatabaseExample.groovy is running
-- execute the following and an update should appear in the Groovy console:
--
update example set phrase = 'one / 1' where example_id = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment