In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about the difference between exclusive, startup nomount and mountopen, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Look at the introduction to oracle, which says that starting routines using the startup nomount command cannot be used with mount open and exclusive. This command can be used when setting up or maintaining a database.
So I checked why they can't be used at the same time, and the difference between them.
The following is a reprint:
Nomount: read the initialization parameter file and start the instance.
Mount: opening control file
Open: open data files, log files
To put it simply, nomount is the state used to create the database, in which case create database.... can be executed
Mount is used to maintain the database, for example, if there is a problem with the database and the data file is deleted by mistake, it cannot be open. At this time, the data file can be removed from the database in the mount state.
Open is a database that can provide services to all users.
Detailed introduction:
1 、 startup nomount
Non-installation startup, which can be executed in this way: rebuild control file, rebuild database
Read the init.ora file and start instance, that is, start the SGA and background processes, which only requires the init.ora file.
2 、 startup mount dbname
Installation startup, which can be executed in this way:
Database log archiving,
Database media recovery,
Bring data files online or offline
Relocate the data file and redo the log file.
Execute "nomount", then open the control file and confirm the location of the data file and the online log file
However, the data file and log file are not checked at this time.
3 、 startup open dbname
Execute "nomount", then "mount", and then open all database files, including Redo log files
The data in the database can be accessed in this way.
4. Startup is equal to the following three commands
Startup nomount
Alter database mount
Alter database open
The three steps of database startup the purpose of nomount,mount,open is to understand the three steps to refine the startup database
The conditions for starting the database to the nomount state are as follows. If you are non-windows OS, there is no registry, and OracleService in the environment variable service must be started
The service name matches the oracle_sid in the registry
There are correct password files and parameter files
Have enough memory
The path described in the parameter file must exist
The database product is installed correctly
Conn sys/oracle as sysdba
Shtudown abort
Startup nomount
Select instance_name,status from v$instance
Start the database to the first step nomount state and do the following
1. Read the parameter file
two。 Allocate memory
3. Start the background process
4. Initialize part of the v$ view
Bring the database to the mount state
Select value from v$spparameter where name='control_files'
Alter database mount
The process of mount database is to read the control file described in the parameter file, verify the correctness of the control file, and read the contents of the control file into memory. Mounu means hanging and is a concept in the operating system. Once mount is done, a meaningless instance is associated with a database. Because the instance is an empty shell. There is no relationship between any database and the instance, we can understand that the instance is a water pump, where the data will be extracted from the reservoir, the example is universal. Mount means to put a general-purpose pump into a designated reservoir. Mount is a read control file, which contains information about data files and log files.
Select instance_name,status from v$instance
Open the database
Alter database open
Read the data file described in the control file
Verify the consistency of the files and, if inconsistent, use log files to restore the database files to a consistent state.
After the database open, ordinary users can access the database.
Only the user's table is visible.
Read-only open database
Startup mount
Alter database open read only
Select open_mode from v$database
The default open mode is read write
If you want to change read only to read write, you must restart the database
We now think back to the three steps of database startup. We first read the parameter file, which can be written by us. After reading the parameter file and then read the control file, the control file describes the data file and log file information, if the control file is lost, we can re-establish, and finally read the data file. Our data is stored in the data file. The database will be started up into three steps, so that we can know exactly where there is a problem and eliminate it quickly. It's kind of like an old mopper, with a big head in the back. From the beginning of a 1K parameter file, and finally to several T large databases. When we only type startup without any parameters, the default is to open, which is equal to startup open
We can see clearly from the results on the screen that there are three steps.
Another command is startup force to force the database to start, which is equivalent to forcing the database to stop and then start the database.
After reading the above, do you have any further understanding of the difference between exclusive, startup nomount and mountopen? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.