Early use of Linux, look at the Oracle listening state and port is just a glance, did not seriously read the content is also the English hint, a few load new pick up Oracle,WinDOS cmd to view listening status find lots of interesting questions,
Oracle Instances and threads Many do not understand the point of expert guidance
First the Oracle start-up phase nomount,mount,open (the rest is not verbose) every phase has been tested and summarized
1. Database shutdown phase (instance state)
The service "Clrextproc" consists of 1 instances.
instance "Clrextproc", State UNKNOWN, That contains this service. 1 a handler .
Connected to the idle routine.
After login has been connected idle process, and the status is unknown, the latter to know the unknown status is not automatically registered, By searching the contents of listener.org, matching services before the registration, in this file does not need to configure Sid,pmon 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
Visible database size, variable buffers and other resources have been started. Let's test and check v$datafile,v$controlfile,v$database.
Sql> select File#,name from V$datafile;
Select File#,name from V$datafile
*
An error occurred on line 1th: ORA-01507:??????
Sql> select name from V$controlfile;
Row not selected
the query sees that the Nomount phase does not load the data file and can detect SGA correlation.
Monitoring Status View (instance)
The service "SOUJIUSUBDB" consists of 1 instances.
The instance "Soujiusubdb", State BLOCKED, contains 1 handlers for this service ...
     reference: this time the instance has started, Blocked blocked state, then the Oracle instance should be a thread running in the operating system, OS blocking calls atomic operations with Pritive, and is blocked because an event cannot be run. but nomount stage majority explanation: Only the instance is created, the database is not loaded, and Oracle creates a variety of memory structures and service processes for the instance and does not open any data files. In Nomount mode, you can access only those data dictionary views related to the SGA area, including V$parameter, V$SGA, v$process, and V$session, all of which are obtained from the SGA area, regardless of the database, Span style= "FONT-SIZE:16PX;" > The system allocates memory, turns on the background process, and updates the alter log file.
So at the level of the operating system to understand this, through the Oracle's Nomount command to create an instance, when the operating system will give the allocation process or thread to respond to requests, Oracle creates the memory structure and service process for the instance, that is, the instance has the necessary resource allocation, Then the state of the thread at this time should be ready state (in addition to get the CPU outside the resource, the processor can be run), insert the ready queue, but the listening state is blocked, it means that the Nomount state, the instance thread in the ready queue is suspended, does not release the cup (the instance should not currently get the CPUs), Call suspend atomic operation, still ready (do not accept scheduling) Nomount is active rather than passive to block.
3, Mount stage
We are going to check the data files, log files, control files are normal, view the listening instance, at this point the instance state becomesready(Readiness State), which is where Oracle invokes the primitive active to wake the instance thread and becomes the active ready state when executing mount.
The service "Clrextproc" consists of 1 instances.
The instance "Clrextproc", State UNKNOWN, contains 1 handlers for this service ...
The service "SOUJIUSUBDB" consists of 1 instances.
Instance "SOUJIUSUBDB", state ready, contains 1 handlers for this service ...
references : This startup mode loads the database for the instance, but keeps the database off. Because the database control file needs to be opened when the database is loaded, neither the data file nor the redo log file can read and write, so the user cannot manipulate the database. under the mount mode , you can access only those data dictionary views associated with the control file, including V$thread, V$controlfile, V$database, V$datafile, and v$logfile, etc. These views are obtained from the control file. startup conditions are required to have control files, if the control file is lost or damaged, start will be error. The system opens the control file, checks the data file, the name and location of the log file, but does not check to see if the file exists at this time.
4. Open Stage
Reference:open Stage, which is the main opening data files, log files, in the process of opening the data file and log file consistency check, if not consistent, the Smon process continues the instance recovery, if the file is missing, open failed.
I thought that this phase of the instance state would be ready to become an execution state, after changing the open phase, after viewing the listener to find a service, but the instance name, the same state, is still ready, the Oracle instance thread has been in a ready state this is not clear, I hope the teachers to give answers, analysis confusion.
Service Summary:
The service "Clrextproc" consists of 1 instances.
The instance "Clrextproc", State UNKNOWN, contains 1 handlers for this service ...
The service "Soujiusubdbxdb" consists of 1 instances.
Instance "SOUJIUSUBDB", state ready, contains 1 handlers for this service ...
The service "SOUJIUSUBDB" consists of 1 instances.
Instance "SOUJIUSUBDB", state ready, contains 1 handlers for this service ...
database shutdown, unload instances, terminate instances, several parameters close the requirements are different, the application is different, but the final whole of a close process is similar, I hope to learn about the closing of the database when the action of the thread.
Oracle startup database in the process of instance and thread Ching see