Home » SQL & PL/SQL » SQL & PL/SQL » Sql query for display client version.
Sql query for display client version. [message #433611] Thu, 03 December 2009 05:08 Go to next message
deep0983
Messages: 28
Registered: April 2009
Junior Member
Hello All,

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Dec 3 16:16:28 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

As you can see in above connection detail i am using oracle 11 client to connect with oracle 10 now i want to display installed oracle client version with the help of sql query? by connecting to the database.

Any suggesstion much appreciated.

Thanks in advance.
Re: Sql query for display client version. [message #433613 is a reply to message #433611] Thu, 03 December 2009 05:15 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
There's definitely no way of getting this information back from the database, as it's purely client information.

A quick scan through the SQL*Plus guide doesn't show any way of getting it to repeat the information either, I'm afraid.
Re: Sql query for display client version. [message #433615 is a reply to message #433611] Thu, 03 December 2009 05:18 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe this is sufficient for you?
SQL> select '&_SQLPLUS_RELEASE' from dual;
'100200040
----------
1002000400

1 row selected.

Regards
Michel
Re: Sql query for display client version. [message #433620 is a reply to message #433615] Thu, 03 December 2009 05:26 Go to previous messageGo to next message
deep0983
Messages: 28
Registered: April 2009
Junior Member
Thanks for quick reeply.

can you please explain how this query work.
Re: Sql query for display client version. [message #433624 is a reply to message #433615] Thu, 03 December 2009 05:38 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
How this will be the answer for OP.

He/She wants the client version Not the Server.

If not if the op`s requirement is for server then so many ways.

SQL> select '&&_O_VERSION' as "Oracle Client Version" from dual ;

Oracle Clien
------------
&&_O_VERSION

SQL> 
SQL> set scan on
SQL> select '&&_O_VERSION' as "Oracle Client Version" from dual ;

Oracle Client Version
-----------------------------------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options




SQL> select '&&_SQLPLUS_RELEASE' as "SQLPLUS_RELEASE" from dual ;

SQLPLUS_RE
----------
1002000100

SQL> select banner from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> 



sriram Smile

[Updated on: Thu, 03 December 2009 05:40]

Report message to a moderator

Re: Sql query for display client version. [message #433626 is a reply to message #433611] Thu, 03 December 2009 05:41 Go to previous messageGo to next message
cookiemonster
Messages: 12321
Registered: September 2008
Location: Rainy Manchester
Senior Member
That is the client version - as long as your client is sqlplus.
SQL*Plus: Release 9.0.1.4.0 - Production on Thu Dec 3 11:41:11 2009

(c) Copyright 2001 Oracle Corporation.  All rights reserved.


Connected to:
Oracle Database 10g Release 10.2.0.2.0 - 64bit Production

SQL> select '&_SQLPLUS_RELEASE' from dual;
old   1: select '&_SQLPLUS_RELEASE' from dual
new   1: select '900010400' from dual

'90001040
---------
900010400

SQL> 
Re: Sql query for display client version. [message #433627 is a reply to message #433626] Thu, 03 December 2009 05:47 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
OK its my mistake i tested that On my 10.2.0.1 server(having both client /server same version)

SQL*Plus: Release 10.2.0.3.0 - Production on Thu Dec 3 17:16:16 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

ind> select '&_SQLPLUS_RELEASE' from dual;
old   1: select '&_SQLPLUS_RELEASE' from dual
new   1: select '1002000300' from dual

'100200030
----------
1002000300

1 row selected.

ind> select '&&_SQLPLUS_RELEASE' as "SQLPLUS_RELEASE" from dual ;
old   1: select '&&_SQLPLUS_RELEASE' as "SQLPLUS_RELEASE" from dual
new   1: select '1002000300' as "SQLPLUS_RELEASE" from dual

SQLPLUS_RE
----------
1002000300

1 row selected.



Tested on 9i client..


SQL*Plus: Release 9.2.0.1.0 - Production on Thu Dec 3 17:21:30 2009

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select '&_SQLPLUS_RELEASE' from dual;
old   1: select '&_SQLPLUS_RELEASE' from dual
new   1: select '902000100' from dual

'90200010
---------
902000100



http://www.lazydba.com/oracle/0__12424.html

[Updated on: Thu, 03 December 2009 05:53]

Report message to a moderator

Re: Sql query for display client version. [message #433628 is a reply to message #433627] Thu, 03 December 2009 05:58 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
@ramoradba, @cookiemonster

Why do you repeat what I posted before?

@deep0983

These are predefined SQL*Plus variables available since client Oracle 10g.

Regards
Michel
Re: Sql query for display client version. [message #433630 is a reply to message #433611] Thu, 03 December 2009 06:05 Go to previous messageGo to next message
deep0983
Messages: 28
Registered: April 2009
Junior Member
Thanks Michel.
Re: Sql query for display client version. [message #433631 is a reply to message #433628] Thu, 03 December 2009 06:05 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
@ michel
i did n`t repeted see my first message...Which is pointing your reply...But later i relised My mistake(Both client and server are Same. Later i agreed with your post In addition i posted a link too... Smile

Thank you
Sriram Smile
Re: Sql query for display client version. [message #433633 is a reply to message #433628] Thu, 03 December 2009 06:42 Go to previous messageGo to next message
cookiemonster
Messages: 12321
Registered: September 2008
Location: Rainy Manchester
Senior Member
Michel Cadot wrote on Thu, 03 December 2009 11:58
@ramoradba, @cookiemonster

Why do you repeat what I posted before?



To prove to ramoradba that your solution shows the client version rather than the server version.
Re: Sql query for display client version. [message #433636 is a reply to message #433633] Thu, 03 December 2009 06:49 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Yes you are right you posted that to prove I am wrong But you missed that your message is a reply to a OP (different message no) Wink there is 1 min difference too.Just kidding.

sriram

[Updated on: Thu, 03 December 2009 06:55]

Report message to a moderator

Previous Topic: Error: ORA-30372: fine grain access policy conflicts with material
Next Topic: problem with SET-Operator on COLLECTIONS
Goto Forum:
  


Current Time: Sat Oct 01 07:35:59 CDT 2016

Total time taken to generate the page: 0.08387 seconds