In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When I used Linux in the early days, I looked at the Oracle listening status and port only by browsing, but I didn't read the content carefully and it was also an English hint. After a few years, I picked up CMD again under Oracle,Windos to check the listening status and found a lot of interesting problems. Please point out what you don't understand about Oracle instances and threads.
First of all, the Oracle startup phase nomount,mount,open (the rest is not verbose) each stage has been tested and summarized.
1. Database shutdown phase (instance status)
The service "CLRExtProc" contains 1 instance.
Instance "CLRExtProc", status UNKNOWN, contains 1 handler for this service.
Connected to an idle routine.
Login has been connected to the idle process, and the status is unknown, later access to information to know that the UNKNOWN status is not automatic registration, by searching the contents of Listener.org, matching services after the registration, in this file does not need to configure SID,PMON will automatically detect, because the database is not started, so idle process.
2. Nomount stage
SQL > startup nomount
The ORACLE routine has been started.
Total System Global Area 1686925312 bytes
Fixed Size 2176368 bytes
Variable Size 1090521744 bytes
Database Buffers 587202560 bytes
Redo Buffers 7024640 bytes
It can be seen that resources such as database size and variable buffers have been started. Let's test and query the vandalism datafile.vandalism controlfilerecoverydatabase.
SQL > select file#,name from v$datafile
Select file#,name from v$datafile
*
An error occurred on line 1: ORA-01507:?
SQL > select name from v$controlfile
No rows selected
The query sees that the data file is not loaded in the nomount phase and can detect SGA correlation.
Monitor status View (instance)
The service "soujiusubdb" contains 1 instance.
Instance "soujiusubdb", status BLOCKED, contains 1 handler for this service.
Reference: when the instance is started and BLOCKED is blocked, then the Oracle instance should be running with threads in the operating system. OS blocking calls atomic operations with pritive. Because an event cannot be run, it is blocked. But most of the nomount phase explains: only the instance will be created, no database will be loaded, and Oracle will only create various memory structures and service processes for the instance, and will not open any data files. In NoMount mode, only those data dictionary views related to the SGA area, including V$PARAMETER, V$SGA, V$PROCESS and V$SESSION, can be accessed. The information in these views is obtained from the SGA area and has nothing to do with the database. The system allocates memory, starts background processes, and updates the alter log file.
So whether it can be understood in this way at the operating system level, through the nomount command of Oracle to create an instance, when the operating system will assign processes or threads to respond to requests, and Oracle creates a memory structure and service process for the instance, that is, if the instance has the necessary resource allocation, then the state of the thread should be ready (in addition to getting resources other than CUP, the processor can run), insert the ready queue But the listening state is blocking, which means that in the nomount state, the instance thread is suspended in the ready queue, does not release CUP (the instance should not currently obtain CPU), invokes suspend atomic operation, and static ready (does not accept scheduling) nomount is active rather than passive to block.
3. Mount stage
At this time, we go to check the data files, log files, and control files are all normal, and check the listening instance. At this time, the instance state becomes Ready (ready state), that is, when Oracle executes mount, it calls the primitive active to wake up the instance thread and become active ready.
The service "CLRExtProc" contains 1 instance.
Instance "CLRExtProc", status UNKNOWN, contains 1 handler for this service.
The service "soujiusubdb" contains 1 instance.
Instance "soujiusubdb", status READY, contains 1 handler for this service.
Reference: this startup mode loads the database for the instance, but keeps the database closed. Because the database control file needs to be opened when loading the database, but neither the data file nor the redo log file can be read or written, so the user cannot operate on the database yet. In Mount mode, only those data dictionary views related to the control file, including V$THREAD, V$CONTROLFILE, V$DATABASE, V$DATAFILE, and V$LOGFILE, can be accessed, all of which are obtained from the control file. The startup condition is that a control file is required. If the control file is lost or damaged, the startup will report an error. The system opens the control file, checks the name and location of the data file, and the log file, but does not check whether the file exists.
4. Open stage
Reference: open stage, which mainly opens data files and log files, and checks the consistency of data files and log files during the opening process. If inconsistent, the SMON process continues instance recovery. If the file is lost, the opening fails.
I thought that at this stage, the instance state would be ready to become the execution state. After changing the open phase, I found that there was one more service after checking the monitor. But the instance name is the same, the state is the same, and it is still ready. It is not clear that the thread of the Oracle instance has been in the ready state. I hope the teachers will give us answers and resolve the confusion.
Service summary..
The service "CLRExtProc" contains 1 instance.
Instance "CLRExtProc", status UNKNOWN, contains 1 handler for this service.
The service "SOUJIUSUBDBXDB" contains 1 instance.
Instance "soujiusubdb", status READY, contains 1 handler for this service.
The service "soujiusubdb" contains 1 instance.
Instance "soujiusubdb", status READY, contains 1 handler for this service.
Database shutdown, uninstall the instance, terminate the instance, several parameter shutdown methods require different, different applications, but in the end, the overall shutdown process is more or less the same. I hope you can also learn about the actions of threads when shutting down the database.
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.