Re: Autonomous Database and Conditional Compilation

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Mon, 16 Dec 2019 20:47:09 +0700
Message-ID: <CAP50yQ_8foSr-0OnP3X6VdNFeBa+dRT-TLnGbpfND3H80QymYA_at_mail.gmail.com>



A wee bit late to the party - but just came across this and recalled this question:

SQL> select * from v$osstat where stat_name = 'INST_TYPE';

STAT_NAME                                                             VALUE
 OSSTAT_ID COMMENTS
CUM
---------------------------------------------------------------- ----------
---------- ----------------------------------------------------------------
---
INST_TYPE                                                                 0
        20 Oracle Cloud

NO

Stefan

On Sat, Nov 23, 2019 at 7:41 PM kris rice <kris.rice_at_jokr.net> wrote:

> Here you go...
>
> https://twitter.com/krisrice/status/1198219314412838912?s=20
>
> SQL Example here: https://t.co/PQYY3CHtUF?amp=1
>
> -kris
>
> On Fri, Nov 22, 2019 at 10:29 AM Ethan Post <post.ethan_at_gmail.com> wrote:
>
>> Anyone know of a constant (or way) I can access to determine if I am
>> trying to compile into an autonomous database? I would like to set up some
>> conditionals in my code.
>>
>> Most of the examples use DBMS_DB_VERSION but don't see anything in the
>> docs for this but might not be looking in the right place.
>>
>> Alternative path at the moment (untested) is to query for the cloud user
>> accounts and if found try to set a CCFLAG and check for that but ideally I
>> want to just compile the package and not have to run SQL prior to that.
>>
>> Thanks,
>> Ethan
>> https://e-t-h-a-n.com
>>
>>
>>

-- 
//
zztat - The Next-Gen Oracle Performance Monitoring and Reaction Framework!
Visit us at zztat.net | _at_zztat_oracle | fb.me/zztat | zztat.net/blog/

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 16 2019 - 14:47:09 CET

Original text of this message