Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Post Unanswered: Oracle Convertion

    I need to convert this oracle statement "select userenv( 'sessionid' ) from dual" to DB2
    Can Anyone help me ?

  2. #2
    Join Date
    Apr 2003
    Posts
    191

    Re: Oracle Convertion

    Hi,

    you will need to define userenv('sessionid') as a function. Then you can use the values statement:

    values userenv('sessionid')

    Johann

    Originally posted by etobar
    I need to convert this oracle statement "select userenv( 'sessionid' ) from dual" to DB2
    Can Anyone help me ?

  3. #3
    Join Date
    Feb 2004
    Posts
    3
    Hi Johan
    i got your message but i need the db2's session number. The oracle function userenv returns many values ( sessionid, userid, ...), and, in this case i need to know the session id, to identify user and comand.

    Thanks

  4. #4
    Join Date
    Apr 2003
    Posts
    191
    Hi etobar,

    sorry, no can do. With DB2, you have no such thing as a session id that is available from SQL. The special register CURRENT USER is all you can get. You will need to implement the rest in your application.

    Johann

    Originally posted by etobar
    Hi Johan
    i got your message but i need the db2's session number. The oracle function userenv returns many values ( sessionid, userid, ...), and, in this case i need to know the session id, to identify user and comand.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •