ExaGridDba

get own session serial# without privilege

Jul 7th, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. [oracle@stormking cdb12201 sqlplus]$ sqlplus /nolog @ conn.pdba.u.sql
  2.  
  3. SQL*Plus: Release 12.2.0.1.0 Production on Fri Jul 7 01:56:21 2017
  4.  
  5. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  6.  
  7. Connected.
  8. SQL> create user r identified by r;
  9.  
  10. User created.
  11.  
  12. SQL> grant create session to r;
  13.  
  14. Grant succeeded.
  15.  
  16. SQL> conn r/r@stormking:1521/pdba
  17. Connected.
  18. SQL> select sid, serial# from v$session_connect_info where sid = sys_context( 'userenv', 'sid' ) and rownum = 1;
  19.  
  20. SID SERIAL#
  21. ---------- ----------
  22. 25 1457
Advertisement
Add Comment
Please, Sign In to add comment