Oracle's Sqlplus common commands

Source: Internet
Author: User

I. Startup and shutdown of Oracle
1, in a single-machine environment
To start or shut down an Oracle system, you must first switch to an Oracle user, as follows
Su-oracle
  
A. Start the Oracle system
Oracle>svrmgrl
Svrmgr>connect Internal
Svrmgr>startup
Svrmgr>quit
  
B. Shut down the Oracle system
Oracle>svrmgrl
Svrmgr>connect Internal
Svrmgr>shutdown
Svrmgr>quit

2, in the dual-machine environment
To start or shut down an Oracle system, you must first switch to the root user, as follows
Su-root
  
A. Start the Oracle system
Hareg-y Oracle
  
B. Shut down the Oracle system
Hareg-n Oracle
  
What kinds of startup methods are available for Oracle databases
  
Description
  
There are several ways to start:

1, Startup Nomount
Non-installation boot, this way startup executable: Rebuild the control file, rebuild the database
  
Read the Init.ora file and start instance, which starts the SGA and background process, which requires only init.ora files.
  
2. Startup Mount DBName
Installation starts, this way starts under executable:
Database log archiving,
Database Media Recovery,
Bring the data file online or offline,
Relocate the data file, redo the log file.
  
Execute "nomount", then open the control file, confirm the location of the data file and the online log file,
However, the data files and log files are not checked for validation at this time.
  
3. Startup Open dbname
Execute "nomount" first, then execute "Mount", and then open all the database files including the redo log file,
This way you can access the data in the database.
  
4, startup, equal to the following three commands
Startup Nomount
ALTER DATABASE Mount
ALTER DATABASE Open
  
5, startup restrict
Constrained mode start
This way the database can be started, but only users with certain privileges are allowed access
When a non-privileged user accesses, the following prompt appears:
ERROR:
Ora-01035:oracle only allow users with restricted SESSION permissions to use
  
6. Startup force
Forced start mode
When the database cannot be closed, you can use startup force to complete the shutdown of the database
Close the database first and then execute the normal startup database command
  
7. Startup pfile= parameter file name
Start mode with initialization parameter file
Read the parameter file first, and then start the database by setting it in the parameter file
Example: Startup Pfile=e:oracleadminoradbpfileinit.ora
  
8, startup EXCLUSIVE
Exclusive and shared boot

Oracle's Sqlplus common commands

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.