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!

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

Christian.Shay -Oracle

XE is not patched (and it would be a long time before the next major release). Can you use some other edition?

User_J188U

I can't run another edition and this is just a synthetic test, but I wanted to report the issue.

Answer

I am able to reproduce this on Windows as well, so I will see if there is a bug filed already and if not, I will file one.

Marked as Answer by User_J188U · Apr 11 2022
User_J188U

Thanks!

1 - 5
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,338 views