STARTUP

Startup a database instance.
This is a SQL*Plus command (not part of standard SQL)

Syntax:

   STARTUP [FORCE] [RESTRICT] [PFILE=filename] NOMOUNT 

   STARTUP [FORCE] [RESTRICT] [PFILE=filename] MOUNT [dbname]

   STARTUP [FORCE] [RESTRICT] [PFILE=filename] OPEN [Open_options] [dbname] 

Open_options:
         READ {ONLY | WRITE [RECOVER]} | RECOVER

Key:
   FORCE
                 Shut down the current Oracle instance (if it is running) with
                 SHUTDOWN mode ABORT, before restarting it. 
                 If the current instance is running and FORCE is not specified,
                 an error results. FORCE is useful while debugging and under abnormal
                 circumstances. It should not normally be used.

   RESTRICT
                 Only allow Oracle users with the RESTRICTED SESSION system privilege
                 to connect to the database. Later, you can use the ALTER SYSTEM command
                 to disable the restricted session feature.

   PFILE=filename
                 The init.ora parameter file to be used while starting up the instance.
                 If PFILE is not specified, then the default STARTUP parameter file is used.
                 The default file used is platform specific.
                 For example, the default file is $ORACLE_HOME/dbs/init$ORACLE_SID.ora on UNIX,
                 and %ORACLE_HOME%\database\initORCL.ora on Windows.

   MOUNT dbname
                 Mount a database but do not open it.
                 dbname is the name of the database to mount or open.
                 If no database name is specified, the database name is taken from the
                 initialization parameter DB_NAME.

   OPEN
                 Mount and open the specified database.

   NOMOUNT
                 Don't mount the database upon instance startup.
                 Cannot be used with MOUNT, or OPEN.

   RECOVER
                 Specifies that media recovery should be performed, if necessary,
                 before starting the instance.
                 STARTUP RECOVER has the same effect as issuing the RECOVER DATABASE command
                 and starting an instance.
                 Only 'complete recovery' is possible with the RECOVER option.

                 Recovery proceeds, if necessary, as if AUTORECOVERY is set to ON,
                 regardless of whether or not AUTORECOVERY is enabled.

                 If a redo log file is not found in the expected location,
                 recovery will continue by prompting you with the suggested location  
                 and name of the subsequent log files that need to be applied.

Startup NOMOUNT will run the background processes for the instance.
Startup MOUNT will open the Control Files.
Startup OPEN will open the Data Files.

On Windows, starting the Oracle services will also startup the instance.

Examples
Startup with a pfile or SPfile

When starting an Oracle instance with the simple command 'startup', Oracle will first look for a binary SPfile in the default location; if it can't find one, it will look for a pfile (init.ora) in the default location.

If you start the oracle instance and specify pfile=xxx then Oracle will use the 'old-fashioned' pfile as you requested.

Startup pfile="C:\oracle\admin\live\pfile\init.ora"

Strangely there is no option that will start an oracle instance with a binary spfile residing in a non-default location.
As a workaround for this, create a traditional init.ora containing one line:
SPfile=E:\pathtoyourSPfile\SPfileLive.ora
Then startup the instance calling the pfile which in turn will reference the SPfile that you want.
For this to work - make sure you don’t also have an SPfile in the default location.

"Be nice to people on the way up, because you’ll meet them on your way down" - Wilson Mizner

Related Oracle Commands:

ALTER DATABASE
Open / Mount
ALTER SESSION
ALTER SYSTEM enable restricted session
SHUTDOWN
ORA-01034 - Oracle not available (the database is down)

Related Views:

   DBA_PENDING_TRANSACTIONS 
   DBA_JOBS_RUNNING  
   V$SESSION

 
Copyright © 1999-2024 SS64.com
Some rights reserved