Anda di halaman 1dari 3

Ans 8== Starting the DB 1) startup 2)(a) startup nomount (b) alter database mount (c) alter database

open The default SPFILE (server parameter file) is located under $ORACLE_HOME/dbs. Or acle will use this SPFILE during startup, if you don t specify PFILE. Oracle will look for the parameter file in the following order under $ORACLE_HOM E/dbs. If any one of them exist, it will use that particular parameter file. spfile$ORACLE_SID.ora spfile.ora init$ORACLE_SID.ora If you want to startup Oracle with PFILE, pass it as a parameter SQL> STARTUP PFILE=/u01/app/oracle/product/10.2.0/dbs/init.ora; * STARTUP OPEN dbname PFILE=filename This command starts the instance, and open s the database named dbname using the parameter file specified by the filename f ollowing the PFILE= clause. This starts up the database in the default, EXCLUSIV E mode. * STARTUP RESTRICT OPEN dbname PFILE=filename This command starts the instance, and opens the database named dbname using the parameter file specified by the f ilename following the PFILE= clause. This starts up the database in the restrict ed only mode (only users with RESTRICTED SESSION privilege can log in). * STARTUP NOMOUNT This command starts the instance, but leaves the database dis mounted and closed. Cannot be used with EXCLUSIVE, MOUNT, or OPEN. Normally this command is used only when creating a database. There are some maintenance activ ities that require the database to be in NOMOUNT but generally it is only used w ith database creation. * STARTUP MOUNT This command starts the instance and mounts the database, but l eaves it closed. * STARTUP OPEN dbname PARALLEL This command starts the instance, opens the database and puts the database in PA RALLEL mode for multi-instance use in pre-Oracle8 versions. In Oracle8, simply s etting the initialization parameter PARALLEL_SERVER to TRUE starts the instance in parallel server (shared) mode. PARALLEL is obsolete in Oracle8. It cannot be used with EXCLUSIVE or NOMOUNT or if the INIT.ORA parameter SINGLE_PROCESS is se t to TRUE. The SHARED parameter is obsolete in Oracle8. 3. STARTUP OPEN dbname EXCLUSIVE This command is functionally identical to (a) above. Cannot be specified if PARA LLEL or NOMOUNT is also specified in pre-Oracle8 versions. EXCLUSIVE is obsolete in Oracle8. If PARALLEL_SERVE is FALSE, the database defaults to EXCLUSIVE. 4. The FORCE parameter can be used with any of the above options to force a shut down and restart of the database into that mode. This is not normally done and i

s only used for debugging and testing. 5. The RECOVER option can be used to immediately start recovery of the database on startup if desired. Errors that can occur during a startup include missing files, improperly specifi ed PFILE path or name, or corrupted file errors. If these occur, the database wi ll immediately shut down. Using OEM (Oracle Enterprise Manager) you must log in as an account that has been assigned the SYSOPER or SYSDBA roles in order to sta rt up or shut down an instance. Ans 9== Shuting down the DB 1) 2) 3) 4) Shutdownn immediately Shutdown normal Shutdown transactional Shutdown abort

3.Shutdown transactional it'll allow any ongoing transaction to complete and then it shutdown the db 2. Normal Shutdown During normal shutdown, before the oracle database is shut down, oracle will wai t for all active users to disconnect their sessions. As the parameter name (norm al) suggest, use this option to shutdown the database under normal conditions. SQL> shutdown Database closed. Database dismounted. ORACLE instance shut down. SQL> 1. Shutdown Immediate During immediate shutdown, before the oracle database is shut down, oracle will rollback active transaction and disconnect all active users. Use this option whe n there is a problem with your database and you don t have enough time to request us ers to log-off. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> 4. Shutdown Abort During shutdown abort, before the oracle database is shutdown, all user sessions will be terminated immediately. Uncomitted transactions will not be rolled back . Use this option only during emergency situations when the shutdown and te doesn t work. $ sqlplus SQL*Plus: Copyright Connected '/ as sysdba' Release 10.2.0.3.0 - Production on Sun Jan 18 11:11:33 2009 (c) 1982, 2006, Oracle. All Rights Reserved. to an idle instance.

shutdown im

SQL> shutdown abort ORACLE instance shut down. SQL>