Problem solve Get help with specific problems with your technologies, process and projects.

Difference between instance and session

What is the difference between an instance and a session?

What is the difference between an instance and a session?
Before defining these terms, I should define a term that was not asked for. In Oracle, a database is a collection of datafiles, control files and online redo logs. When you turn off the database server, the database remains. When you reboot the database server, the database is still there because the files which make up the database are still intact on the server's file system.

An instance is defined as the processes and memory which needs to be available on the database server in order to make the data accessible. When one starts a database, they are really starting the instance. The act of starting the instance starts a number of processes on the server and allocates memory for the database instance. When the instance is shut down, the database remains in the files.

A session corresponds to one or more users interacting with the instance. When a user starts a new database session, a process is started on the server and the user's application interacts with this process (called a dedicated server process) which interacts with the instance.

Dig Deeper on Oracle DBA jobs, training and certification