I am logged into the below mentioned DB server as sys. This DB is a rarely used test DB.
I want to list all sessions sorted by when the sessions were spawned in this DB instance. I believe v$session.logon_time should be used for this very basic info.
But, I can see that the logon_time just reflects the time I run the query on v$session.
SQL> select sysdate from dual;
SYSDATE
-----------------
15-JAN-2018 19:02
SQL> select logon_Time, machine from v$session where type = 'USER' order by logon_time desc;
LOGON_TIME MACHINE
----------------- ----------------------------------------------------------------
15-JAN-2018 19:02 brcstgdbv7301
15-JAN-2018 19:02 brcstgdbv7301
15-JAN-2018 19:00 brcsoaappv7301
15-JAN-2018 19:00 brcstgdbv7301
15-JAN-2018 18:16 brcstgdbv7301
20-NOV-2017 13:51 brcosbappv7301
25-OCT-2017 21:12 brcstgdbv7301
16-OCT-2017 00:51 brcstgdbv7301
8 rows selected.
-- 1 minute later
SQL> select sysdate from dual;
SYSDATE
-----------------
15-JAN-2018 19:03
SQL> select logon_Time, machine from v$session where type = 'USER' order by logon_time desc;
LOGON_TIME MACHINE
----------------- ----------------------------------------------------------------
15-JAN-2018 19:03 brcstgdbv7301
15-JAN-2018 19:03 brcstgdbv7301
15-JAN-2018 19:03 brcstgdbv7301
15-JAN-2018 19:00 brcsoaappv7301
15-JAN-2018 18:16 brcstgdbv7301
20-NOV-2017 13:51 brcosbappv7301
25-OCT-2017 21:12 brcstgdbv7301
16-OCT-2017 00:51 brcstgdbv7301
8 rows selected.
--- Eight minutes later
SQL> select sysdate from dual;
SYSDATE
-----------------
15-JAN-2018 19:11
SQL> select logon_Time, machine from v$session where type = 'USER' order by logon_time desc;
LOGON_TIME MACHINE
----------------- ----------------------------------------------------------------
15-JAN-2018 19:11 brcstgdbv7301
15-JAN-2018 19:11 brcstgdbv7301
15-JAN-2018 19:10 brcstgdbv7301
15-JAN-2018 19:00 brcsoaappv7301
15-JAN-2018 18:16 brcstgdbv7301
20-NOV-2017 13:51 brcosbappv7301
25-OCT-2017 21:12 brcstgdbv7301
16-OCT-2017 00:51 brcstgdbv7301
8 rows selected.