Oracle startup is divided into three phases:
Nomount:
First, find the parameter file (pfile/spfile) and create an instance from the file. The process of nomount is the process of starting a DB instance.
No parameter file cannot be Nomount
Mount
Obtain the location information of the control file from the parameter file, and then open the control file.
--No control file cannot mount
Open
Open all the files described in the control file.
--No data file cannot open
-------------------------------------------------------------------------------------
Nls_lang Setup Essentials:
CHCP = 936 represents GBK, and theNls_lang settings are as follows:
Set NLS_LANG=SIMPLIFIEDCHINESE_CHINA.ZHS16GBK
the encoding of the client system is whatthe Nls_lang need to set. when the data is stored, Oracle decodes the received data according to the encoding of the Nls_lang, and then the Oracle data is encoded into the database.
First, the parameter file generation
Idle instance can turn pfile and SPFile to each other
Pfile (text file): Client files, can be placed in other locations .
Spfile (binary): server-side file, can only be placed under Database , but may be specified in the pfile location.
Create pfile from SPFile;
Create SPFile from Pfile;
Note: Before modifying the parameters, it is best for Mr. Pfile to be a file .
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/4A/wKioL1QSdb2TqkbnAAXCiVz0YHI712.jpg "title=" 1.png " alt= "Wkiol1qsdb2tqkbnaaxcivz0yhi712.jpg"/>
move SPFile and pfile to another place to start:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/49/48/wKiom1QSdemCtFD7AACVOJaj8DY724.jpg "title=" 2.png " alt= "Wkiom1qsdemctfd7aacvojaj8dy724.jpg"/>
If you have a initsid.ora file, you can put the Initsid.ora file in the database directory, or start with the specified method:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/48/wKiom1QSdi6y7tFdAAEEfulkLZo945.jpg "title=" 3.png " alt= "Wkiom1qsdi6y7tfdaaeefulklzo945.jpg"/>
sql> startup nomountpfile= ' D:\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\bak\inith
Xw168.ora '
The specified parameters are started and cannot be directly create SPFile from Pfile;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/48/wKiom1QSdnPAD8aKAADJG0deABA153.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1qsdnpad8akaadjg0deaba153.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/4A/wKioL1QSdoSTEjoaAACBgAp47BU187.jpg "style=" float: none; "title=" 5.png "alt=" Wkiol1qsdostejoaaacbgap47bu187.jpg "/>
turn off the instance and restart the Nomount to start.
Second,spfile file Move location
Create the Initsid.ora file in the database directory , and write only the following content:
Spfile= ' D:\oracle\product\11.2.0\dbhome_1\database\bak\SPFILEHXW168. ORA '
the location of the SPFile file. such as:
Show parameter SPFile; you can find out now that the SPFile used is under the Bak directory.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/49/48/wKiom1QSdsqiUrD1AATxIfkrZxw299.jpg "title=" 6.png " alt= "Wkiom1qsdsqiurd1aatxifkrzxw299.jpg"/>
Third, add or remove control files
Parameter file record control file location, control file location:
D:\ORACLE\ORADATA\HXW168\CONTROL01. Ctl
D:\ORACLE\FLASH_RECOVERY_AREA\HXW168\CONTROL02. Ctl
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/48/wKiom1QSd0KiZ7jAAAElgdi0vNo345.jpg "style=" float: none; "title=" 7.png "alt=" Wkiom1qsd0kiz7jaaaelgdi0vno345.jpg "/>
put them D:\ORACLE\ORADATA\HXW168\CONTROL01. to remove the CTL file, start as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/4A/wKioL1QSd1Oj2CU1AAGXHhQeIQ4271.jpg "style=" float: none; "title=" 8.png "alt=" Wkiol1qsd1oj2cu1aagxhhqeiq4271.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/48/wKiom1QSd0KCSaX5AADTn6M3iLQ875.jpg "style=" float: none; "title=" 9.png "alt=" Wkiom1qsd0kcsax5aadtn6m3ilq875.jpg "/>
The Alter log is as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/49/4A/wKioL1QSd5aQ_rMvAAGIHhPinXg980.jpg "title=" 10.png "alt=" Wkiol1qsd5aq_rmvaagihhpinxg980.jpg "/>
There are two ways to solve this:
1, because the control files are mirrored with each other, the other control files copied over and renamed, you can.
2, in the parameter file to delete this control file information, the following steps:
to view the Control_files parameter type, you can see false: Indicates that a restart is required after the change takes effect.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/48/wKiom1QSd8Lj00ZoAAEd489pg70668.jpg "title=" 11.png "alt=" Wkiom1qsd8lj00zoaaed489pg70668.jpg "/>
Sql> alter system setcontrol_files= ' D:\ORACLE\FLASH_RECOVERY_AREA\HXW168\CONTRO
L02. CTL '; This will be an error, so need to add scope=spfile;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/49/4A/wKioL1QSeAiCMuKbAAE60xNonDE659.jpg "title=" 12.png "alt=" Wkiol1qseaicmukbaae60xnonde659.jpg "/>
shut down the database and boot to nomount , you can see that there is only one control file:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/4A/wKioL1QSeE_QjUzvAAE0GgqQsgI693.jpg "title=" 13.png "alt=" Wkiol1qsee_qjuzvaae0ggqqsgi693.jpg "/>
can enter Mount State normally
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/48/wKiom1QSeFOxFLxUAACGkpmgeXE709.jpg "title=" 14.png "alt=" Wkiom1qsefoxflxuaacgkpmgexe709.jpg "/>
put D:\ORACLE\ORADATA\HXW168\CONTROL01. The CTL is added back. The command is as follows:
Sql> alter system set control_files= ' D:\ORACLE\FLASH_RECOVERY_AREA\HXW168\CONTRO
L02. CTL ', ' D:\ORACLE\ORADATA\HXW168\CONTROL01. CTL ' Scope=spfile;
close the database and put D:\ORACLE\FLASH_RECOVERY_AREA\HXW168\CONTROL02. the CTL file is copied to and renamed D:\ORACLE\ORADATA\HXW168\CONTROL01. CTL.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/49/4A/wKioL1QSeH6S1NEYAAHq2y3I3RM013.jpg "title=" 15.png "alt=" Wkiol1qseh6s1neyaahq2y3i3rm013.jpg "/>
Three, parameter setting
1, Modify The parameters of the session
Alter nls_date_format= ' Yyyy/mm/ddhh24:mi:ss ';
2, Modify the system parameters
Alter system set control_files= ' path1 ', ' path2 ' scope=spfile;
3. View parameter default values
-- See what values the parameter has
SELECT * from V$parameter_valid_valueswhere name= ' Audit_trail '
-- See what the parameters are static or dynamic
SELECT * from V$system_parameter wherename= ' Audit_trail '
Issys_modifiable:
False: After reboot, it is necessary to specify Scope=spfile;
IMMEDIATE: Effective immediately after the change.
This article from "Despite the wrong, let me wrong to die!" "Blog, be sure to keep this provenance http://hxw168.blog.51cto.com/8718136/1551541
"Oracle" database start-up phase parameter file, control file problem handling