This is a discussion on version awareness in sql script. within the Oracle Database forums, part of the Database Server Software category; --> Hello. I have a simple script, but I want the script to alter it's behavior depending on whether it's ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello. I have a simple script, but I want the script to alter it's behavior depending on whether it's being run against a 10, 9 or an 8 instance. The patch level doesn't matter. I can use V$VERSION and parse the output: SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production PL/SQL Release 9.2.0.6.0 - Production CORE 9.2.0.6.0 Production TNS for Solaris: Version 9.2.0.6.0 - Production NLSRTL Version 9.2.0.6.0 - Production I would need to grab "Oracle9i", but I'm wondering if there's an easier way to do this? |
| |||
| "DaLoverhino" <DaLoveRhino@hotmail.com> wrote in message news:1143671383.228741.265170@i40g2000cwc.googlegr oups.com... : Hello. I have a simple script, but I want the script to alter it's : behavior depending on whether it's being run against a 10, 9 or an 8 : instance. The patch level doesn't matter. : : I can use V$VERSION and parse the output: : SQL> select * from v$version; : : BANNER : ---------------------------------------------------------------- : Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production : PL/SQL Release 9.2.0.6.0 - Production : CORE 9.2.0.6.0 Production : TNS for Solaris: Version 9.2.0.6.0 - Production : NLSRTL Version 9.2.0.6.0 - Production : : : I would need to grab "Oracle9i", but I'm wondering if there's an easier : way to do this? : select version from v$instance not sure if it's also available via SYS_CONTEXT -- might check that out ++ mcs |
| |||
| "DaLoverhino" <DaLoveRhino@hotmail.com> a écrit dans le message de news: 1143671383.228741.265170@i40g2000cwc.googlegroups. com... | Hello. I have a simple script, but I want the script to alter it's | behavior depending on whether it's being run against a 10, 9 or an 8 | instance. The patch level doesn't matter. | | I can use V$VERSION and parse the output: | SQL> select * from v$version; | | BANNER | ---------------------------------------------------------------- | Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production | PL/SQL Release 9.2.0.6.0 - Production | CORE 9.2.0.6.0 Production | TNS for Solaris: Version 9.2.0.6.0 - Production | NLSRTL Version 9.2.0.6.0 - Production | | | I would need to grab "Oracle9i", but I'm wondering if there's an easier | way to do this? | dbms_utility.db_version Regards Michel Cadot |
| |||
| On Thu, 30 Mar 2006 13:20:06 +0400, "Vladimir M. Zakharychev" <bob--nospam--@dynamicpsp.com> wrote: >Since 9i, SQL*Plus exposes built-in _O_RELEASE variable, Incorrect, available since Oracle 6 at least, and maybe Oracle 5. Could you also *please* refrain from top-posting? -- Sybrand Bakker, Senior Oracle DBA |
| ||||
| >>Since 9i, SQL*Plus exposes built-in _O_RELEASE variable, > > Incorrect, available since Oracle 6 at least, and maybe Oracle 5. Indeed, my bad. For some reason I thought it's not available in pre-9i, no idea why. > Could you also *please* refrain from top-posting? Sorry, won't happen anymore. Bad habits die hard, ya know... Regards, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com |