如何确认数据库为Oracle& ;?它使用SQL的哪个版本? [英] How can I confirm a database is Oracle & what version it is using SQL?
本文介绍了如何确认数据库为Oracle& ;?它使用SQL的哪个版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为应用程序构建安装程序.用户可以选择他们已经配置的数据源,并指定它是哪种数据库.我想通过将SQL语句发送到数据源来确认数据库类型确实是Oracle,如果可能的话,确认它们正在运行的Oracle版本.
I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle they are running by sending a SQL statement to the datasource.
推荐答案
运行以下SQL:
select * from v$version;
您将得到类似的结果:
BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
这篇关于如何确认数据库为Oracle& ;?它使用SQL的哪个版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文