Checking who (or what) is connected to my Oracle database

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';

The goldfish tips

To me, learning is definitely one of the best parts of life.

At work, at home, outside, I am so thankful for learning a lot of things… but Mother Nature gave me an ephemeral memory, and too often I happen to forget things.

I will post here some of the things I learn: those I am sure I will forget, and I believe I will need again at some point… hoping that this blog will help you and me.

If you like the idea, visit also my friend Emil’s blog, and don’t be shy to share your experience.