Skip to main content

Oracle Instance Start-up Steps

The Startup (nomount) Stage

When you issue the startup command, the first thing the database will do is enter the nomount stage. During the nomount stage, Oracle first opens and reads the initialization parameter file (init.ora) to see how the database is configured. 

For example, the sizes of all of the memory areas in Oracle are defined within the parameter file.

After the parameter file is accessed, the memory areas associated with the database instance are allocated. Also, during the nomount stage, the Oracle background processes are started. Together, we call these processes and the associated allocated memory the Oracle instance. Once the instance has started successfully, the database is considered to be in the nomount stage. If you issue the startup command, then Oracle will automatically move onto the next stage of the startup, the mount stage.

Starting the Oracle Instance (Nomount Stage)


There are some types of Oracle recovery operations that require the database to be in nomount stage. When this is the case, you need to issue a special startup command: startup nomount, as seen in this example:

SQL> startup nomount

The Mount Stage

When the startup command enters the mount stage, it opens and reads the control file. The control file is a binary file that tracks important database information, such as the location of the database datafiles.
In the mount stage, Oracle determines the location of the datafiles, but does not yet open them. Once the datafile locations have been identified, the database is ready to be opened.

Mounting the Database

Some forms of recovery require that the database be opened in mount stage. To put the database in mount stage, use the startup mount command as seen here:

SQL> startup mount

If you have already started the database instance with the startup nomount command, you might change it from the nomount to mount startup stage using the alter database command:

SQL> alter database mount;

The Open Oracle startup Stage


The last startup step for an Oracle database is the open stage. When Oracle opens the database, it accesses all of the datafiles associated with the database. Once it has accessed the database datafiles, Oracle makes sure that all of the database datafiles are consistent.

Opening the Oracle Database

To open the database, you can just use the startup command as seen in this example

SQL> startup

If the database is mounted, you can open it with the alter database open command as seen in this example:

SQL> alter database open;

Opening the Database in Restricted Mode

You can also start the database in restricted mode. Restricted mode will only allow users with special privileges (we will discuss user privileges in a later chapter) to access the database (typically DBA?s), even though the database is technically open. We use the startup restrict command to open the database in restricted mode as seen in this example.

SQL> startup restrict

You can take the database in and out of restricted mode with the alter database command as seen in this example:
-- Put the database in restricted session mode.

SQL> alter system enable restricted session;

-- Take the database out of restricted session mode.

SQL> alter system disable restricted session;

Note:  Any users connected to the Oracle instance when going into restricted mode will remain connected; they must be manually disconnected from the database by exiting gracefully or by the DBA with the ?alter system kill session? command.

Problems during Oracle Startup


The typical DBA life is like that of an airline pilot, ?Long moments of boredom followed by small moments of sheer terror?, and one place for sheer terror is an error during a database startup.
The most typical reason for a database not starting up is a prior database crash, a data corruption, disk failure or some other catastrophic event from which the database cannot recover. In these cases, you have to go into database recovery mode to start your instance. There is a chapter on recovery later in this book and we will discuss what to do when Oracle will not startup.

Comments

Popular posts from this blog

Using GREP in UNIX

How To Use grep Command In Linux / UNIX by  VIVEK GITE  on  AUGUST 2, 2007  ·  147 COMMENTS H ow do I use grep command in Linux? grep command searches the given file for lines containing a match to the given strings or words. By default, grep prints the matching lines. Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines. The name, "grep", derives from the command used to perform a similar operation, using the Unix/Linux text editor ed: g/re/p grep command syntax grep 'word' filename grep 'string1 string2' filename cat otherfile | grep 'something' command | grep 'something' Use grep to search file Search /etc/passwd for boo user: $ grep boo /etc/passwd You can force grep to ignore word case i.e match boo, Boo, BOO and all other combination with -i option: $ grep -i "boo" /etc/passwd Use grep recursively You can search recursively i.e. read all files under each

Hi! I'm Java...

Java is a computer programming language. It enables programmers to write computer instructions using English based commands, instead of having to write in numeric codes. It’s known as a “high-level” language because it can be read and written easily by humans. Like English, Java has a set of rules that determine how the instructions are written. These rules are known as its “syntax”. Once a program has been written, the high-level instructions are translated into numeric codes that computers can understand and execute. Who Created Java? In the early nineties, Java was created by a team led by James Gosling for Sun Microsystems. It was originally designed for use on digital mobile devices, such as cell phones. However, when Java 1.0 was released to the public in 1996, its main focus had shifted to use on the Internet. It provided more interactivity with users by giving developers a way to produce animated webpages . Over the years it has evolved as a successful language for

A Hit Count Using Java Servlet's Session Tracking

import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class SessionTracker extends HttpServlet {         public void doGet(HttpServletRequest req,HttpServletResponse res)         throws ServletException,IOException         {                res.setContentType("text/html");                PrintWriter out=res.getWriter();                HttpSession session=req.getSession(true);                Integer count=(Integer)session.getValue("tracker.count");                if(count==null)                {                         count=new Integer(1);                }else{                         count=new Integer(count.intValue()+1);                }                session.putValue("tracker.count",count);                out.println("<HTML><BODY><H1>SESSION TRACKING DEMO</H1>");                out.println("You've visited this page "+count+((count.intValue()==1)?" time.":"times."