It happened recently that we had to move (export/import) an Oracle DB instance from one machine to another.
Well, this instance was pointed by several applications that had to be reconfigured for connecting to the new machine.
After this was done, before shutting down the “old” instance, I had a doubt: is someone/something still using the old database?
To answer this question, there is what we could call an “SQL BLAME” query:
SELECT username, seconds_in_wait, machine, port, terminal, program, module, service_name FROM v$session WHERE type = 'USER';