spunix 发表于 2011-12-23 01:28

实例启动与关闭

<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">管理</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">oracle</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt" class=MsoNormal><SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库启动顺序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 18pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Database Contorl<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>------<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Listener<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>------<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Database</FONT></SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 39pt; mso-list: l0 level2 lfo1; tab-stops: list 39.0pt" class=MsoNormal><FONT face="Times New Roman"><SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US><SPAN style="mso-list: Ignore">(1)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US>Database Contorl</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">: </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用于管理一个数据库,每个实例都有对应的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Database Contorl</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置信息:</SPAN><FONT face="Times New Roman"> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">主机名与</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">TCP</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">端口号</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动方法:</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> emctl start/stop/status dbconsole</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">emctl</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">需要设置</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">ORACLE_SID</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的环境变量</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问方法:</SPAN><SPAN lang=EN-US><a href="https://localhost:port/em" target="_blank"><FONT face="Times New Roman">https://localhost:port/em</FONT></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注:</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">$ORACLE_HOME/install/portlist.ini </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">记录</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">OUI</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">DBCA</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所有端口</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="TEXT-INDENT: -10.5pt; MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 1.0gd; mso-char-indent-count: -1.0" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>(2) </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动数据库监听器:用于监视一个端口的数据库连接请求,使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Oracle Net</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">协议通信。</SPAN></P>
<P style="TEXT-INDENT: -10.5pt; MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 1.0gd; mso-char-indent-count: -1.0" class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp; </FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动方式:</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">lsnrctl start/stop/status</FONT></SPAN></P>
<P style="TEXT-INDENT: -10.5pt; MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 1.0gd; mso-char-indent-count: -1.0" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Database Contorl</FONT></SPAN></P>
<P style="TEXT-INDENT: -10.5pt; MARGIN: 0cm 0cm 0pt 21pt; mso-para-margin-left: 1.0gd; mso-char-indent-count: -1.0" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Windows</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">(3) sqlplus</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">连接数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>#sqlplus /nolog</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">2.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动和关闭数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">(1)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用户登陆数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注:普通用户无法启动打开数据库,因为在打开数据库后才能使用数据字典验证</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用户连接格式:</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> connect user/passwd [@connect_alias] as sysdba</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Eg: connect sys/oracle @orcl as sysdba</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Sql&gt;show user </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现实登陆系统的身份信息</SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 39pt; mso-list: l0 level2 lfo1; tab-stops: list 39.0pt" class=MsoNormal><SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">(2)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库的状态及启动</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*SHUTDOWN<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库关闭状态,实例不存在</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*NOMOUNT<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例已经构建,但是没有连接数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*MOUNT<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实例定位并且读取数据库控制文件</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*OPEN<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">完全打开,所有数据库都可以连接</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Sql&gt;startup<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开启数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">startup</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动数据库,会自动运行以上状态,并且通过定位文件初始化实例</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">$ORACLE_HOME/dbs/spfileSID.ora<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">动态</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">$ORACLE_HOME/dbs/spfile.ora<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">动态</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">$ORACLE_HOME/dbs/initSID.ora<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">静态</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数文件用于在内存中构建</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">SGA</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和启动后台进程</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Sql&gt;show parameter background</FONT></SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 39pt; mso-list: l0 level2 lfo1; tab-stops: list 39.0pt" class=MsoNormal><SPAN style="mso-fareast-font-family: 'Times New Roman'" lang=EN-US><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">(3)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关闭数据库</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">与数据库的启动顺序完全相反</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Shutdown<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>normal/transactional/immediate/abort</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*normal<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不可建立新连接,继续所有连接,直到所有用户推出则关闭</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*transactional<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不建立新连接,会话的事务完成后就关闭</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*immediate<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不可建立新连接,当前所有会话中止,活动的事务回滚,随后关闭</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">*abort </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相当于断电</SPAN><FONT face="Times New Roman"> </FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接关闭</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">前三个模式,在会话中止后,</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">PMON</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进程会回滚任何未结束的事务,</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">CKPT</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进程发布检查点,促使</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">DBWn</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进程将所有更新内容从高速缓冲区写入到数据文件中。</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">LGWR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进程将内存中的变化矢量转存到日志文件。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt" class=MsoNormal><SPAN lang=EN-US><FONT face="Times New Roman">Sql&gt;startup force<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相当于</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> shutdown abort </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后再</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> startup</FONT></SPAN></P></DIV>
页: [1]
查看完整版本: 实例启动与关闭