Introduction to Oracle Startup and shutdown database methods

Source: Internet
Author: User
Tags terminates

UNIX shutdown order, first shut down the database, then the operating system, and finally the power down
Only users with SYSDBA and Sysoper system privileges can start and close the database.
You should start the listener before you start the database, or you will not be able to manage the database using the command method, including starting and shutting down the database.
Although the database is functioning correctly, if the listener is not started, the client cannot connect to the database, and the OEM and Isqlplus tools cannot be used on the server side.
Start listener lsnrctl start shutdown listener lsnrctl stop
Query Listener State LSNRCTL status
To start a database:
1, create and start routines, memory and service processes are allocated, initialized and started, initialization parameter files. The initialization parameters in the parameter file determine how to start the routine startup Nomount
2, load the database, open the database control file, and get the database name, the location and name of the data file on the physical structure of the database information, the parameter file to find the control file to load the database startup mount
3, open the database, and the routine will open all the data files that are online and the redo log files. If any of the data files listed in the control file or redo log files cannot be opened, the database returns an error message, and a database recovery is required. Startup Open
In the process of starting a database, files are used in the following order: parameter files, control files, data files, and redo log files. When these files are normal, the database starts correctly.
If you want to perform maintenance work, you must start the database with the Nomount option (run a textbooks to create a new database, and rebuild the control file)
In Nomount boot mode, you can access only those database dictionary views associated with the SGA area, regardless of the database
Mount state, can (rename data file, add delete or rename redo log file, perform database full restore operation, change database archive mode) in this mode, in addition to access to the SGA area-related data dictionary view, you can also access to control file-related data dictionary views
If it is difficult to start the database in the normal way, you can start the database startup force with the Force option
Startup restrict starts the database and puts it into open mode, but users with RESTRICETD session permissions can access the database at this time. If you need to perform maintenance in the database in open mode, and make sure that at this point other users cannot establish connections and perform tasks on the database, you should use this option (Perform export import of database data, perform data loading operations, temporarily block users from using data for database porting or upgrading), After the work is done, use ALTER system disable restricted session.
When you start the database, you must specify an initialization parameter file that, if not specified, will first read the server initialization parameter file SPFile for the default location, and if not, then find the text initialization parameter file pfile.
Startup Force Pfile=e:pfleoamissid.ora
Switch process ALTER DATABASE Mount/open
To close the database step:
1, the database is closed, Oracle writes the contents of the Redo log cache to the redo log file, writes the changed data in the database cache to the data file, and then closes all the data files and redo log files, and the control files of the database are still open. However, because the database is turned off, users cannot access the database
2, unload the database, shut down the database, the routine can be uninstalled, control file is closed again this time, but the routine still exists
3, terminating the routine, the process terminates, and the memory SGA area allocated to the routine is reclaimed.
Shutdown normal shuts down the database
Shutdown transactional (organizes any user to establish a new connection while preventing the currently connected user from starting any new transactions, waiting for all currently uncommitted active transactions to be committed, and then immediately disconnecting the user, and once all users are disconnected, shut down immediately and uninstall the database , and terminates the routine)
Shutdown immediate (any currently uncommitted transactions are returned and disconnected directly)
Shutdown Abort (Oracle is not closed in either of these three ways, some data may be lost)

There are several ways to start this:

1, Startup Nomount

Non-installation startup, this way to launch executable: Rebuild control file, rebuild database

Read the Init.ora file, start the instance, that is, start the SGA and background processes, this startup requires only Init.ora files.

2, startup Mount DBName

Install startup, this way to start under executable:

Database log archiving,

Database Media Recovery,

Bring the data file online or offline,

Reposition the data file and redo the log file.

Execute "nomount" and then open the control file to confirm the location of the data file and the online log file.

However, the data file and log files are not checked for verification at this time.

3, Startup Open dbname

Execute "nomount" first, then "Mount", and then open all the database files, including the redo log file,

In this way, the data in the database can be accessed.

4, startup, equal to the following three orders

Startup Nomount

ALTER DATABASE Mount

ALTER DATABASE Open

5, startup restrict

Constraint start

This way the database can be started, but only users with certain privileges are allowed to access

When an unprivileged user accesses, the following prompts appear:

ERROR:

Ora-01035:oracle only allow users with restricted session permissions to use 6, startup force

Forced start mode

When you cannot close the database, you can use startup force to complete the shutdown of the database

Close the database before performing the normal start database command

7, startup pfile= parameter filename

Startup method with initialization parameter file

Read the parameter file first, then start the database by setting in the parameter file

Example: Startup Pfile=e:oracleadminoradbpfileinit.ora

8, startup EXCLUSIVE

There are three ways to start:

1. Shutdown normal

Shut down the database in the normal way.

2, Shutdown immediate

Close the database immediately.

Shutdown immediate is executed in SVRMGRL, the database is not immediately closed,

Instead of shutting down (terminating the session, releasing the session resource) after Oracle performs some cleanup work,

When you cannot close a database using shutdown, shutdown immediate can complete the operation of the database shutdown.

3, Shutdown abort

Close the database directly, the session that is accessing the database will be abruptly terminated,

If a large number of operations in the database are in progress, it will take a long time to restart the database after performing shutdown abort.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.