A database instance is created while launching the Oracle database, and the status can be selected. Typically, you can launch an instance by loading and opening the database, such any valid user can link to an instance and perform a typical database access operation, which is described below.
First, the method of starting the database
There are many ways to start the database instance, which are described below:
1. Use SQL * Plus to connect to Oracle with administrator privileges using SQL * Plus, then publish the startup command to initiate the database. 2. Use the Recovery Manager to perform the Startup and Shutdown commands to start and close database instances using RCOVERY. It is best to use this method in the RMAN environment instead of calling the SQL * PLUS method. 3. Use Oracle Enterprise Manager to use Oracle Enterprise Manager to manage the Oracle database, of course, also contains launch and shut down the database. Oracle Enterprise Manager is an independent Oracle database product that provides an integrated and complex system management platform for managing Oracle products with graphics console, agents, public services, and various tools.
Steps to start the database instance: Start SQL * Plus: SQLPLUS / NOLO, then connect to Oracle: Connect UserName / Password As Sysdba as sysdba, and then connect to the Oralce database, and ready to start the database instance. Then use the startup command to start the database instance, Oracle must read the instance profile from the server parameter file or the traditional text initialization parameter file. When using the startup command without a PFile clause, Oracle reads the initialization parameters from the server parameter file (spfile) specified by the platform. You can also specify where the initialization parameters are located, such as Startup Pfile = / U01 / Oracle / DBS / Init.ora.
Starting a database instance can be used in different modes:
1. Starting but without loading a database instance, this mode does not allow access to the database, and usually only applicable to the database creation or control file recreation. To enable this database mode, you can use the command startup nomount to launch the database instance. 2, start the instance and load the database, but keep the database shutdown. This mode is suitable for some DBA actions, such as renameting data files, adding cancel or renameting redo log files, performing a complete database recovery operation, but does not allow a general access to the database. To enable this database mode, you can use the command startup mount to launch the database instance. 3, start the instance, load and open the database. This mode allows all legal users to be accessed in a way that is not limited. To enable this database mode, you can use the command startup to start the database instance. 4. Force the database to start, Startup force. In some special cases, some problems may be encountered when starting the database instance. Never forcing the database to start unless you use Shutdown Normal, Shutdown Immediate, Shutdown Transactional commands cannot close the current instance. If you are running an instance, then Startup Force can use the Abort mode before restarting instances to close this instance.
Second, change the availability of the database
You can change the availability of the database. The purpose of this is perhaps the way to access or only the database is read only because of the maintenance reasons. When a specific database management operation is required, the database must be launched and load it on the instance, but the database must be closed, which can be obtained by starting the instance and the loading database. To load a previously opened database, do not open an instance, you can use the command: ALTER DATABASE MOUNT Open a database, making the database that is already loaded but is still off, can be used for general purposes, can use the command ALTER DATABASE OPEN. After performing this statement, any effective Oracle user with CREATE SESSION system privileges can be connected to the database.
Open the database in read-only mode. Read-only mode Open the database to ensure that data files and redo log files are not overwritten, but this mode does not restrict database recovery trains or do not generate operations on changing database status, for example, can make data files Machine or online because these operations do not affect the data content. Use the commands Alter Database Open read Only to make the database only state. You can also open the database using the read / write mode, Alter Database Open Read Write.
Third, turn off the database
To initialize the shutdown operation of the database, you can use the SQL * Plus's shutdown command, and the control will not return to the session of the initial database shutdown operation before the shutdown operation is complete. When the user is being closed, if the user tries to connect, then he will receive the following information: ORA-01090: SHUTDOWN Progress-Connection Is Not Permitted To turn off the database instance, you must first connect with SYSDBA or SYSOPER. You can use multiple modes to close the database, such as Normal, Immediate, Transactional, Abort, etc. For their meanings, please check the relevant information.