Create Database   «Prev  Next»

Lesson 4 Starting an instance
Objective Start the new COIN instance.

Starting Oracle instance

Remember that an instance refers to the
  1. software processes and
  2. associated memory structures
, and that the term database refers to the physical database files. It follows, then, that before you can create a new database, you must first start the software. You can do this from the command prompt. If you are using Windows, go ahead and open a command prompt window now.
The first thing you need to do is indicate which instance you want to work with. Under Windows NT, this is done using the SET command to set the value of an environment variable named ORACLE_SID to the name of the instance. For example:


On a UNIX system, the procedure is much the same. You set an environment variable, and then export it. These commands should work on most UNIX systems:


Starting an instance with the NOMOUNT option

The next step is to start Server Manager, connect to the instance that you want to start, and then start that instance. Use the Server Manager STARTUP command to do this. An important caveat is that you must start the instance using the NOMOUNT option. NOMOUNT tells Server Manager to start the instance, but not to mount or open the database. That is important because mounting the database implies opening the control file. Since you have not created the database yet, there are no files to open. The following example shows this entire process being executed under Windows NT:
C:\Oracle\ADMIN\COIN\create>set oracle_sid=coin
Oracle Server Manager Release - Production
(c) Copyright 1997, Oracle Corporation.
Oracle8i Enterprise Edition Release
With the Partitioning and Java options
PL/SQL Release - Production
SVRMGR> connect internal
SVRMGR> startup nomount
ORACLE instance started.
Total System Global Area              34451404 bytes
Fixed Size                               65484 bytes
Variable Size                         17469440 bytes
Database Buffers                      16384000 bytes
Redo Buffers                            532480 bytes

The process is the same on UNIX. The only difference is that with UNIX, you use the export command, not SET, to set the value of the ORACLE_SID environment variable. Give this a try now. Set ORACLE_SID=COIN, start Server Manager, and issue a STARTUP NOMOUNT command. If you've done everything right so far, the COIN instance should start. Once you've started it, issue the SHUTDOWN command to shut it back down again.

Some Common Problems

Here are some of the common problems that people encounter when they first try to start a new Oracle8 instance. Clicking on any of these common problems will provide you with some suggestions for dealing with these issues:

Case-sensitivity issues Unix

Case-sensitivity is a problem that UNIX users run into all the time. UNIX is a case-sensitive operating system. When it comes to starting an instance, the case of the SID matters. If your SID is COIN, then your init file should be initCOIN.ora, and you should set ORACLE_SID=COIN. The directory name, under the Oracle admin directory, should also be COIN. Remember that the environment variable is case sensitive as well. Use ORACLE_SID, not oracle_sid.

Forgetting NOMOUNT option

If you forget to include NOMOUNT on the STARTUP command line, Oracle8 will try to open the database control files. You will see an error like this:
ORA-00205: error in identifying controlfile, 
check alert log for more info

When this happens, Oracle8 will have actually started the instance. You could probably ignore the error and go on to create your database. However, to be conservative, I would recommend running a SHUTDOWN command followed by the correct form of the STARTUP command: STARTUP NOMOUNT.
  1. Forgetting to connect.
  2. Forgetting to run ORADIM first.
  3. Initialization file is not where Oracle expects it to be.