ehxz 发表于 2006-12-24 14:40:36

Oracle 8i升级Oracle 10G

   <span>Oracle <chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">8&#46;1&#46;7</chsdate>&#46;4</span><span>升级</span><span>Oracle 10&#46;2</span> <p><span><span> </span>Oracle</span><span>提供了升级工具让用户可以将</span><span>Database</span><span>从低版本升级到更高的版本</span><span>,8i</span><span>可以直接升级到</span><chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"><span>10G</span></chmetcnv><span>,</span><span>但</span><span> 8i</span><span>必须是</span><chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899"><span>8&#46;1&#46;7</span></chsdate><span>&#46;4(</span><span>含</span><span>)</span><span>以上的版本</span><span>,8&#46;1&#46;7&#46;0</span><span>是不被支持的</span><span>&#46;Oracle</span><span>提供了两种升级方法</span><span>,</span><span>用向导升级和手工升级</span><span>,</span><span>以下分别介绍本人升级的过程</span><span>&#46;</span></p><p><span><span>一&#46;<span> </span></span></span><span>向导升级</span></p><p><span><span>1&#46;<span> </span></span></span><span>首先</span><span>,</span><span>应该备份</span><span>8i </span><span>数据库</span><span>(</span><span>但然</span><span>,</span><span>你也可以选择不备份</span><span>)</span></p><p><span><span>2&#46;<span> </span></span></span><span>安装</span><span>Oracle 10G</span><span>在和</span><span>8i</span><span>不同的</span><span>Home</span><span>下</span><span>,</span><span>选择不要创建数据库</span></p><p><span><span>3&#46;<span> </span></span></span><span>以</span><span>SysDBA</span><span>的身份</span><span>,</span><span>登入到</span><span>8i</span><span>数据库</span><span>,</span></p><p><span>SQL>Spoolinfo&#46;log</span></p><p><span>SQL>@O</span><span><span>RACLE_HOME</span></span><font face="新宋体"><code><span>/rdbms/admin/utlu102i&#46;sql</span></code><code /></font></p><p><span>SQL>Spooloff</span></p><p><span><span>4&#46;<span> </span></span></span><span>查看</span><span></span><span>info&#46;log,</span><span>按照</span><span>LOG</span><span>上的提示</span><span>,</span><span>将</span><span>RBS</span><span>修改到符合要求</span><span>,</span><span>其它警告可以不去修改</span><span>,</span><span>在</span><span>Upgrade</span><span>的过程中系统会提示</span><span>,</span><span>点确定会由升级程序修改</span><span>&#46;</span></p><p><span><span>5&#46;<span> </span></span></span><span>在开始找到</span><span>Oracle</span><span>菜单的数据库升级工具</span><span>,</span><span>点击运行</span></p><p><span><span>6&#46;<span> </span></span></span><span>根据向导提示升级</span><span>(</span><span>因为之前已经备份</span><span>,</span><span>升级时选择已经备份</span><span>,</span><span>不再需要升级程序帮你备份</span><span>),</span><span>在确认窗口</span><span>,</span><span>要选择确定</span><span>,</span><span>继续</span><span>,</span><span>是等肯定按钮以完成升级动作</span><span>&#46;</span></p><p><span>如果你的初始化参数正确</span><span>,</span><span>一般情况会顺利结束升级动作</span><span>,</span><span>如果过程中出现错误</span><span>,</span><span>就要将</span><span>DB</span><span>复原</span><span>,</span><span>用手动升级了</span><span>&#46;</span><span>我在升级一台数据库时曾遇到</span><span>Ora-00064</span><span>错误而终至升级</span><span>&#46;</span></p><p><span>二</span><span>,</span><span>手动升级</span></p><p><span>1&#46; </span><span>首先</span><span>,</span><span>应该备份</span><span>8i </span><span>数据库</span><span>(</span><span>但然</span><span>,</span><span>你也可以选择不备份</span><span>)</span></p><p><span><span> </span>2&#46; </span><span>安装</span><span>Oracle <chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0">10G</chmetcnv></span><span>在和</span><span>8i</span><span>不同的</span><span>Home</span><span>下</span><span>,</span><span>选择不要创建数据库</span></p><p><span><span> </span>3&#46; </span><span>以</span><span>SysDBA</span><span>的身份</span><span>,</span><span>登入到</span><span>8i</span><span>数据库</span><span>,</span></p><p><span>SQL>Spoolinfo&#46;log</span></p><p><span>SQL>@O</span><span><span>RACLE_HOME</span></span><font face="新宋体"><code><span>/rdbms/admin/utlu102i&#46;sql</span></code><code /></font></p><p><span>SQL>Spool off</span></p><p><span><span>4&#46;<span> </span></span></span><span>Copy 8i</span><span>的初始化参数文件到</span><span></span><chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"><span>10G</span></chmetcnv><span> Home</span><span>正确的位置</span></p><p><span><span>5&#46;<span> </span></span></span><span>Copy</span><span>密码文件到</span><span></span><chmetcnv w:st="on" unitname="g" sourcevalue="10" hasspace="False" negative="False" numbertype="1" tcsc="0"><span>10G</span></chmetcnv><span> Home</span><span>正确的位置</span></p><p><span><span>6&#46;<span> </span></span></span><span>根据</span><span>info&#46;log</span><span>的提示</span><span>,</span><span>修改</span><span>10G</span><span>下的初始化参数文件</span><span>,info&#46;log</span><span>会建议哪些参数修改为哪个值</span><span>,</span><span>那些参数已经不再需要</span><span>,</span><span>请删除之</span><span>,</span><span>那些参数是新的</span><span>,</span><span>需要增加</span><span>,</span><span>请按照建议修改</span></p><p><span><span>7&#46;<span> </span></span></span><span>根据</span><span>info&#46;log</span><span>修改</span><span>redo log, Datafile, Rbs</span><span>等的大小</span></p><p><span><span>8&#46;<span> </span></span></span><span>Shutdown 8i</span><span>数据库</span></p><p><span><span>9&#46;<span> </span></span></span><span>停止原数据库的服务</span></p><p><span><span>10&#46;<span> </span></span></span><span>用</span><span>oradim</span><span>删除</span><span></span><span>Sid</span></p><p><span><span>11&#46;<span> </span></span></span><span>用你修改过的参数文件建立新的数据库实例</span><span>(oradim)</span></p><p><span><span>12&#46;<span> </span></span></span><span>以</span><span>SysDBA</span><span>的身份进入</span><span>Sqlplus,</span><span>将数据库启动到</span><span>upgrade</span><span>状态</span></p><p><span>SQL>startup upgrade</span></p><p><span><span> </span></span><span>我在启动时遇到</span><span>Ora-00064</span><span>的错误</span><span>,</span><span>修改初始化参数文件</span><span>,</span><span>修改过数个参数后重新运行成功</span><span>,</span><span>因此不知到是那个参数起了效果</span><span>,</span><span>大家可以试一下</span><span>&#46;</span></p><p><span><span>13&#46;<span> </span></span></span><span>Create tablespace SySaux</span></p><p><span>CREATE TABLESPACE sysaux DATAFILE 'sysaux01&#46;dbf'</span></p><p><span><span> </span>SIZE <chmetcnv w:st="on" unitname="m" sourcevalue="500" hasspace="False" negative="False" numbertype="1" tcsc="0">500M</chmetcnv> REUSE</span></p><p><span><span> </span>EXTENT MANAGEMENT LOCAL</span></p><p><span><span> </span>SEGMENT SPACE MANAGEMENT AUTO</span></p><p><span><span> </span>ONLINE;</span></p><p><span><span>14&#46;<span> </span></span></span><span>SQL>@C:\oracle\product\<chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">10&#46;2&#46;0</chsdate>\db_1\RDBMS\ADMIN\catupgrd&#46;sql</span></p><p><span><span>15&#46;<span> </span></span></span><span>SQL>@C:\oracle\product\<chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">10&#46;2&#46;0</chsdate>\db_1\RDBMS\ADMIN\utlu102s&#46;sql</span></p><p><span><span>16&#46;<span> </span></span></span><span>SQL>shutdown immediate</span></p><p><span><span>17&#46;<span> </span></span></span><span>SQL>startup</span></p><p><span><span>18&#46;<span> </span></span></span><span>SQL>@C:\oracle\product\<chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">10&#46;2&#46;0</chsdate>\db_1\RDBMS\ADMIN\olstrig&#46;sql</span></p><p><span><span>19&#46;<span> </span></span></span><span>SQL>@C:\oracle\product\<chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">10&#46;2&#46;0</chsdate>\db_1\RDBMS\ADMIN\utlrp&#46;sql</span></p><p><span><span>20&#46;<span> </span></span></span><span>停止</span><span>8i</span><span>的监听器服务</span></p><p><span><span>21&#46;<span> </span></span></span><span>创建</span><span></span><span>10G</span><span>的监听器服务</span></p><p><span>升级完成</span></p>
页: [1]
查看完整版本: Oracle 8i升级Oracle 10G