2

So, I know that there are 3 modes of startup modes available for the instance which is NOMOUNT, MOUNT, and OPEN. What I want to know is in NOMOUNT mode it is stated that the instance started but still not associated with the Database then Who activates the instance? Is it the database itself or is it something else?

And If I use the command shutdown then is the instance only that got shutdown or is the database too got shutdown?

Thanks in advance!

3 Answers 3

6

Think of it this way:

  • the database is the set of physical files, on disk. It's a completely passive "thing". It doesn't "do" anything on its own - it's just data.
  • the instance is the software/processes (with its memory) that manages the database. It's the active part. It's what clients connect to, it's what processes SQL, reads data, updates it, maintains the transaction logs, etc.

When you start with nomount, you start the instance (start a few processes, create the memory areas), but don't actually go look at the database. You'll have something in memory ready to mount a database, or do the few maintenance things you can do in that state (like creating a database), but that's all. The database is completely inaccessible at that point.

When you mount, the control file (which contains a description of the database's files) is read, but the database is still not open. I.e. you can't access the data itself.

Only you finally open the database can clients start interacting with the database.

Things get a bit more complicated with RAC, but the principle is the same: the database is only the set of files. The instances are what allow you to interact with the database.

Shutdown progresses in the opposite direction. For a normal, non-RAC shutdown, the instance flushes all the in-memory data that's not yet saved in the database, and closes the database files. Clients can no longer access the data.
Then the instance dismounts the database, closing the control files. At this point you're left with pretty much the same thing as with an instance in nomount - a set of processes and memory that can't really do much.
The final step is the actual shutdown: the memory areas are released back to the OS and the processes die, which is the end of that instance.

The database doesn't ever do anything. The instances are the only active parts of the system.

For a more in-depth view, see Oracle Database Instance. It has an overview of the startup and shutdown sequence, and other essential information.

6
  • so in NOMOUNT, the instance started by itself or is there any components or anything that started it?
    – RedFux227
    Nov 7, 2012 at 18:34
  • When you run sqlplus and type startup nomount, you are starting an instance. Nothing else. The database might not even exist at that point. If instead you type startup, you start an instance, mount a database, then open that database, which you can then query by connecting to the instance.
    – Mat
    Nov 7, 2012 at 18:37
  • Ok alright then I can assume that when the instance is started then it's just start doesn't matter what runs it. Next, when the instance is started, the allocation of SGA for that instance is determined by the instance itself or anything else or doesn't matter who allocates it?
    – RedFux227
    Nov 7, 2012 at 18:52
  • The instance reads the parameter file (pfile or spfile). That's what determines all the parameters and memory sizes. This is what instance startup does: read those parameters, and create the processes and memory structures to match.
    – Mat
    Nov 7, 2012 at 18:54
  • so to sum it up I can say : the instance is started (just started no matter what component started it), and the SGA thing is defined by the instance itself. Am I Correct? Thank You
    – RedFux227
    Nov 8, 2012 at 4:00
0

Answers from the Oracle Concepts Guide:

Overview of Database and Instance Startup

In a typical use case, you manually start an instance and then mount and open the database, making it available for users. You can use the SQL*Plus STARTUP command, Oracle Enterprise Manager (Enterprise Manager), or the SRVCTL utility to perform these steps.

Overview of Database and Instance Shutdown

Oracle Database automatically performs the following steps whenever an open database is shut down consistently:

  1. Database closed The database is mounted, but online data files and redo log files are closed.

  2. Database unmounted The instance is started, but is no longer associated with the control file of the database.

  3. Database instance shut down The database instance is no longer started.

5
  • Yes I've read that, what I just want to know is by reading that : 1. When the instance started, which thing started this instance? Is it the database or something else? 2. When the instance is shutted-down, is that mean the database also shutted-down or the database is still up (always on)?
    – RedFux227
    Nov 7, 2012 at 18:23
  • 1. Instances are started by applications which may run automatically when the computer starts. Nov 7, 2012 at 19:46
  • 2. Shutting down the instance is the last internal step of a clean database shutdown. Nov 7, 2012 at 19:46
  • in the clean database shutdown, it is said that the database is dismounted and closed, is that mean the database became offline or it's always on but nobody using it?
    – RedFux227
    Nov 8, 2012 at 3:59
  • Offline in the sense that it is inaccessible. Off would be a more accurate description than On. Nov 8, 2012 at 14:36
0

http://intranet.spanservices.com/sites/funConnect/connect/MAGAZINE/SPAN%20Connect%20-%20March%202013.pdf

  1. Login to the system with oracle username

    Typical Oracle installation will have oracle as username and dba as group. On Linux, do su to oracle as shown below.

    $ su - oracle
    
  2. Connect to Oracle as sysdba

    Make sure ORACLE_SID and ORACLE_HOME are set properly as shown below.

    $ env | grep ORA
    ORACLE_SID=DEVDB
    ORACLE_HOME=/u01/app/oracle/product/10.2.0
    

    You can connect using either “/ as sysdba” or an Oracle account that has DBA privilege.

    $ sqlplus '/ as sysdba'
    SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 18 11:11:28 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning and Data Mining options
    SQL>
    
  3. Start Oracle Database

    The default SPFILE (server parameter file) is located under $ORACLE_HOME/dbs. Oracle will use this SPFILE during startup, if you don’t specify a PFILE.

    Oracle will look for the parameter file in the following order under $ORACLE_HOME/dbs. If any one of them exist, it will use that particular parameter file.

    spfile$ORACLE_SID.ora
    spfile.ora
    init$ORACLE_SID.ora
    
2
  • hiOracle will look for the parameter file in the following order under $ORACLE_HOME/dbs. If any one of them exist, it will use that particular parameter file. spfile$ORACLE_SID.ora
    – user21164
    Mar 12, 2013 at 10:54
  • 1
    Hi, welcome to DBA.SE. I'm not sure how this addresses the question asked by RedFux227. They're not asking how to start or shutdown a database, but what the different mount states are and what they do. Could you elaborate on that? (Also the link you posted doesn't work for me. The fact at it contains "intranet" in the URL makes me think that's not something that's supposed to be published.)
    – Mat
    Mar 12, 2013 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.