Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: get version number with SQL query?

Re: get version number with SQL query?

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 1 Sep 2003 16:33:11 +0100
Message-ID: <3f5366ba$0$256$ed9e5944@reading.news.pipex.net>


"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message news:3F536186.B9CB23E0_at_exxesolutions.com...
> Niall Litchfield wrote:
>
> > "vipan" <dba_at_no_spam.netscape.net> wrote in message
> > news:3F5332C0.6090001_at_no_spam.netscape.net...
> > > Hi
> > >
> > > you can query DBA_REGISTRY view and get the version of installed
> > components.
> >
> > Not on any of my 8i databases you can't.
> >
> > --
> > Niall Litchfield
> > Oracle DBA
> > Audit Commission UK
>
> Not with 9i either as clearly shown by the following.
> ===========================================
>
> In fact the following is what is produced:
>
> SQL*Plus: Release 9.2.0.2.0 - Production on Mon Sep 1 08:08:14 2003
>
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
>
> Connected to:
> Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.2.0 - Production
>
> SQL> desc dba_registry
> Name Null? Type
> ----------------------------------------- -------- ---------------
> COMP_ID NOT NULL VARCHAR2(30)
> COMP_NAME VARCHAR2(255)
> VERSION VARCHAR2(30)
> STATUS VARCHAR2(11)
> MODIFIED VARCHAR2(20)
> CONTROL NOT NULL VARCHAR2(30)
> SCHEMA NOT NULL VARCHAR2(30)
> PROCEDURE VARCHAR2(61)
> STARTUP VARCHAR2(8)
> PARENT_ID VARCHAR2(30)
>
> SQL> select version from dba_registry;
>
> VERSION
> ------------------------------
> 9.2.0.1.0
> 9.2.0.1.0
> 9.2.0.1.0
>
> SQL>
>
> ===========================================
>
> dba_registry shows 9.2.0.1.0 and the fact, as indicating at login is
> clearly different.
>

Ah. What I mean't was

SQL*Plus: Release 9.2.0.3.0 - Production on Mon Sep 1 16:30:40 2003

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle8i Release 8.1.7.4.1 - Production
JServer Release 8.1.7.4.1 - Production

SQL> select * from dba_registry;
select * from dba_registry

              *
ERROR at line 1:
ORA-00942: table or view does not exist

I hadn't considered that you could query it and get an incorrect answer

-- 
Niall Litchfield
Oracle DBA
Audit Commission UK
Received on Mon Sep 01 2003 - 10:33:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US