Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get Oracle server version and SQL session id with OCIAttrGet()

user11763611Nov 15 2017 — edited Nov 17 2017

Hi all!

After connecting to Oracle using OCI, we need to know the current server version, and the user session id.

I searched then OCI doc, but could not find anything about that.

Is there a way to get that information, without executing SQL?

Obviously for now we do some SQL like:

  SELECT banner FROM v$version WHERE banner LIKE 'CORE%'

  SELECT userenv('SESSIONID') FROM dual

But if we could avoid that it would speed the connection steps.

Thanks!

Seb

This post has been answered by Sdhamoth-Oracle on Nov 15 2017
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 15 2017
Added on Nov 15 2017
9 comments
2,335 views