Multiple methods for starting or disabling Oracle databases

Source: Internet
Author: User

Multiple methods for starting or disabling Oracle databases

There are many ways to start and close oracle.

Here, we only provide three methods:

L SQL * plus

L OEM Console

L Windows Console

1. Take SQL * plus as an example:

A. Prepare

First, we use SQL * plus to connect to Oracle

Sqlplus/nolog starts SQL * plus without connecting to the database.

Connect/as sysdba connects to oracle as A DBA

B. Start

It is relatively simple to start

Startup is OK.

However, there are three oracle startup modes:

L Startup nomount (nomount mode) starts the instance and does not load the database.

L Startup mount (mount mode) Start the instance to load the database but not open the database

L Startup (open mode) starts the instance to load and open the database, which is the command we used above

In Nomount mode, oracle only creates various Memory Structures and service processes for instances and does not open any database files. Therefore:

1) create a new database

2) recreate the control file

Both operations must be performed in this mode.

In Mount mode, oracle only loads the database but does not open the database. Therefore:

1) Rename the data file

2) add, delete, and rename the redo date file

3) perform full database recovery

4) change the database archiving Mode

All four operations must be performed in this mode.

Open Mode (that is, the above startup does not contain any parameters.

Of course, the three modes can be converted:

Alter database mount (nomount mode)-> alter database open (mount mode)-> (open Mode)

Of course, there are other cases where we can set the database to a non-restricted or restricted State in open mode.

In a restricted State, only DBA can access the database:

1) execute Data Import and Export

2) use SQL * loader to extract external data

3) regular users must be temporarily denied access to the database.

4) database migration or upgrade

All four operations must be performed in this status.

When you open the database, use the startup restrict command to enter the restricted State.

Use the alter system disable restricted session command to change the restricted State to a non-restricted State.

Use the alter system enable restricted session command to change the unrestricted state to the restricted State.

Use alter database open read only to make the database read-only.
Use alter database open read write to change the database to read/write status.

Of course, in some cases, you may not be able to start the database successfully using any of the above startup methods. In this case, you must use the startup force command to forcibly start the database. Of course, no one wants this situation :)

C. Shut down the database

1) Shut Down normally

2) Close shutdown immediate now

3) Close the transaction shutdown transactional

4) Force shutdown abort to close. Of course, no one wants to encounter this situation.

2. OEM as an Example

Oracle Enterprise Management (OEM) is often misunderstood. All databases are similar and have an Enterprise Management. Even small databases such as Mysql have Enterprise Management functions. Of course, the Enterprise Management functions of each database are different. Of course, the difference is not great. The purpose of Enterprise Management is to allow us to quickly, conveniently, silly to manage the database, think about it if I go to the DOS interface every day to operate the P-SQL, T-SQL ...... Depressed? Of course, I also wrote a comparison. ctrl C and ctrl V are OK.

The Sqlplus/nolog, Connect/as sysdba commands mentioned in the first section are similar to the Operations

Follow the steps above to connect to the database.

The following describes how to start and close a database:

Click the configuration options in the database tree ORADB01 created in the previous chapters:

1) the corresponding Nomount mode has been started.

2) the corresponding mount mode has been reprinted

3) open the corresponding open mode

After you click the expected button, the following dialog box is displayed.

1) Shut Down normally

2) immediately close shutdown immediate

3) shutdown transactional

4) abort and forcibly close shutdown abort

After confirmation, the following dialog box is displayed.

Restrict access to the database corresponding to alter system disable restricted session

Alter system enable restricted session

The read-only mode corresponds to alter database open read only.

Alter database open read write

Simple: A lot of SQL * plus commands have changed to several buttons in the OEM.

3. windows Console

Familiar with this:
Oracle ************ Agent Used for OEM management structure
Oracle ************ HTTPSERVER oracle Web Server
Oracle ************ ManagementServer is used for OEM management structure
Oracle ************ server-side processes of the TNSListener oracle Network Structure
Oracle ************* OEMREP archive file
Oracle ************* ORADB001 database created by the user

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.