Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
set serveroutput on
CREATE OR REPLACE PROCEDURE is_adb AS
BEGIN
$IF $$is_autonomous $THEN
dbms_output.put_line('Yup');
$ELSE
dbms_output.put_line('No');
$END
END is_adb;
/
declare
p_service varchar2(200);
begin
SELECT SYS_CONTEXT ('USERENV', 'SERVICE_NAME')
into p_service
FROM DUAL;
if ( p_service like '%.adwc.oraclecloud.com' ) then
execute immediate 'ALTER PROCEDURE is_adb COMPILE PLSQL_CCFLAGS = ''is_autonomous:TRUE'' REUSE SETTINGS';
end if;
end;
/
begin
is_adb();
end;
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.