




已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
數(shù)據(jù)庫版本升級操作手冊 目錄備份數(shù)據(jù)庫2升級Oracle軟件3修改ORACLE_HOME12升級實例13手工使用腳本升級實例13升級遇到問題的解決辦法14檢查升級后的版本信息和無效對象15附錄16本文用于指導(dǎo)oracle數(shù)據(jù)庫由版本.0升級到版本.0升級步驟如下: 備份數(shù)據(jù)庫 升級oracle 軟件 修改ORACLE_HOME 升級實例 檢查升級后的版本信息和無效對象備份數(shù)據(jù)庫由于oracle升級存在一定風(fēng)險,所以在升級前一定要對已有數(shù)據(jù)進行備份。1、 停掉所有使用數(shù)據(jù)庫的相關(guān)程序,以及數(shù)據(jù)庫。2、 對數(shù)據(jù)庫文件進行冷備份。備份后的文件可轉(zhuǎn)存到異機或在本地存放。升級Oracle軟件1、獲取oracle升級軟件p10404530_112030_Linux-x86-64_1of7.zip 及p10404530_112030_Linux-x86-64_2of7.zip。2、將其上傳到數(shù)據(jù)庫服務(wù)器的/tmp/目錄下并解壓。unzip p10404530_112030_Linux-x86-64_1of7.zipunzip p10404530_112030_Linux-x86-64_1of7.zip3、 解壓后,會在當(dāng)前目錄下生成一個database目錄。4、 切換到oracle用戶,執(zhí)行oracle升級腳本。5、 su - oracle/tmp/database/runInstaller6、不需要進行任何更改,直接點擊下一步。7、選擇跳過軟件更新,點擊下一步。8、選擇升級現(xiàn)有數(shù)據(jù)庫,點擊下一步。9、語言選擇簡體中文和英語,點擊下一步。10、選擇企業(yè)版,并點擊下一步。11、Oracle基目錄無需更改,軟件位置需要更改為新的位置,這樣可以減少宕機時間,是oracle所推薦的方法。如下圖我們將軟件安裝位置選擇為/home/oracle/oracle11g3,修改后,點擊下一步。12、數(shù)據(jù)庫管理員選擇dba,數(shù)據(jù)庫操作者選擇oinstall,點擊下一步。13、檢查先決條件,通過后點擊“安裝”按鈕14、用root用戶執(zhí)行root.sh腳本,執(zhí)行后,點擊“確定”按鈕。15、配置監(jiān)控,因為我們之前已經(jīng)配置過,直接選擇取消即可。16、由于選擇跳過配置監(jiān)聽,所以此處會報錯,不過沒有關(guān)系。點擊下一步。17、此處會提示一些配置失敗,是否繼續(xù)。18、選擇“是”, 結(jié)束Oracle database 軟件的安裝。修改ORACLE_HOME注:此文中,數(shù)據(jù)庫升級前軟件的安裝目錄為/home/oracle/oracle11g2,升級后的安裝目錄為/home/oracle/oracle11g3,若升級前的安裝目錄與文中提到的不符,請按實際內(nèi)容進行修改。如下所有內(nèi)容均使用oracle用戶來進行修改。1、 拷貝dbs目錄內(nèi)容oracledave dbs$ cd /home/oracle/oracle11g2/dbs oracledave dbs$ cp * /home/oracle/oracle11g3/dbs2、拷貝admin目錄中的內(nèi)容oracledave admin$ cd / home/oracle/oracle11g2/network/admin oracledave admin$ cp -R * /home/oracle/oracle11g3/network/admin3、修改.bashrc文件中的ORACLE_HOME。oracledave admin$ vi /home/oracle/.bashrcexport ORACLE_BASE=/home/oracleexport ORACLE_HOME=$ORACLE_BASE/oracle11g3/export ORACLE_SID=orclexport PATH=$ORACLE_HOME/bin:$PATH修改后保存退出。4、 修改/etc/oratab中的ORACLE_HOMEoracledave db_1$ vi /etc/orataborcl:/home/oracle/oracle11g3:N升級實例 升級Instance 有兩種方法,第一種是使用dbua工具,第二種是手工執(zhí)行腳本。 此文中,我們使用腳本來升級實例。升級前驗證由于之前,我們修改了oracle用戶的.bashrc,因此一定要重新連接oracle用戶以獲得最新的ORACLE_HOME。查看ORACLE_HOME的方法:su - oracleexport 找到ORACLE_HOME那一條,查看是否為最新。確認(rèn)已獲取到最新的ORACLE_HOME后則可執(zhí)行后續(xù)操作;否則應(yīng)退出當(dāng)前用戶,重新連接。手工使用腳本升級實例1、 切換oracle用戶,以dba角色進入數(shù)據(jù)庫。su - oraclesqlplus / as sysdba2、 以升級方式啟動數(shù)據(jù)庫。SQL STARTUP UPGRADE3、設(shè)置log輸出。:SQL SPOOL upgrade.log4、打印預(yù)升級信息。SQL $ORACLE_HOME/rdbms/admin/utlu112i.sql5、執(zhí)行升級腳本。SQL $ORACLE_HOME/rdbms/admin/catupgrd.sql6、由于上一步會關(guān)閉數(shù)據(jù)庫。所以此處要重啟數(shù)據(jù)庫。SQL STARTUP7、運行狀態(tài)工具顯示升級結(jié)果。該腳本會顯示升級各個組件所花的時間。SQL $ORACLE_HOME/rdbms/admin/utlu112s.sql8、運行升級后操作。SQL $ORACLE_HOME/rdbms/admin/catuppst.sql9、重編譯并重驗證任何剩余的應(yīng)用程序?qū)ο蟆QL $ORACLE_HOME/rdbms/admin/utlrp.sql10、檢查包和類的正確性。SQL SELECT count(*) FROM dba_invalid_objects;COUNT(*)- 0SQL SELECT distinct object_name FROM dba_invalid_objects;no rows selected11、Exit SQL*Plus.至此,通過腳本升級操作結(jié)束。升級遇到問題的解決辦法如果在升級中遇到問題,可以重新進行升級。具體的步驟如下:1、停止數(shù)據(jù)庫。SQL SHUTDOWN IMMEDIATE2、以升級模式啟動數(shù)據(jù)庫。SQL STARTUP UPGRADE3、設(shè)置log輸出。SQL SPOOL upgrade.log4、重新執(zhí)行catupgrd.sqlSQL$ORACLE_HOME/rdbms/admin/catupgrd.sql注意:第一次執(zhí)行此腳本不會報錯,再次執(zhí)行時,會報ORA-00001的錯誤,可以直接忽略。5.執(zhí)行 utlu112s.sql:SQL$ORACLE_HOME/rdbms/admin/utlu112s.sql檢查升級后的版本信息和無效對象SQL SELECT COMP_NAME, VERSION,STATUS FROM SYS.DBA_REGISTRY;COMP_NAME VERSION STATUS- -OWB .0 VALIDOracle Application Express 0.10 VALIDOracle Enterprise Manager .0 VALIDOLAP Catalog .0 VALIDSpatial .0 VALIDOracle Multimedia .0 VALIDOracle XML Database .0 VALIDOracle Text .0 VALIDOracle Expression Filter .0 VALIDOracle Rules Manager .0 VALIDOracle Workspace Manager .0 VALIDCOMP_NAME VERSION STATUS- -Oracle Database Catalog Views .0 VALIDOracle Database Packages and Types .0 VALIDJServer JAVA Virtual Machine .0 VALIDOracle XDK .0 VALIDOracle Database Java Packages .0 VALIDOLAP Analytic Workspace .0 VALIDOracle OLAP API .0 VALID18 rows selected.附錄各腳本執(zhí)行結(jié)果,供參考:utlu112i.sqlSQL $ORACLE_HOME/rdbms/admin/utlu112i.sqlOracle Database 11.2 Pre-Upgrade Information Tool 06-20-2013 16:01:00Script Version: .0 Build: 001.*Database:*- name: SOC- version: .0- compatible: .0- blocksize: 8192- platform: Linux x86 64-bit- timezone file: V11.*Tablespaces: make adjustments in the current environment*- SYSTEM tablespace is adequate for the upgrade. minimum required size: 695 MB- SYSAUX tablespace is adequate for the upgrade. minimum required size: 483 MB- UNDOTBS1 tablespace is adequate for the upgrade. minimum required size: 400 MB- TEMP tablespace is adequate for the upgrade. minimum required size: 60 MB.*Flashback: OFF*Update Parameters: Update Oracle Database 11.2 init.ora or spfileNote: Pre-upgrade tool was run on a lower version 64-bit database.*- If Target Oracle is 32-Bit, refer here for Update Parameters:- No update parameter changes are required.- If Target Oracle is 64-Bit, refer here for Update Parameters:- No update parameter changes are required.*Renamed Parameters: Update Oracle Database 11.2 init.ora or spfile*- No renamed parameters found. No changes are required.*Obsolete/Deprecated Parameters: Update Oracle Database 11.2 init.ora or spfile*- No obsolete parameters found. No changes are required.*Components: The following database components will be upgraded or installed*- Oracle Catalog Views upgrade VALID- Oracle Packages and Types upgrade VALID- JServer JAVA Virtual Machine upgrade VALID- Oracle XDK for Java upgrade VALID- Oracle Workspace Manager upgrade VALID- OLAP Analytic Workspace upgrade VALID- OLAP Catalog upgrade VALID- EM Repository upgrade VALID- Oracle Text upgrade VALID- Oracle XML Database upgrade VALID- Oracle Java Packages upgrade VALID- Oracle interMedia upgrade VALID- Spatial upgrade VALID- Expression Filter upgrade VALID- Rule Manager upgrade VALID- Oracle Application Express upgrade VALID. APEX will only be upgraded if the version of APEX in. the target Oracle home is higher than the current one.- Oracle OLAP API upgrade VALID.*Miscellaneous Warnings*WARNING: - Database is using a timezone file older than version 14. After the release migration, it is recommended that DBMS_DST package. be used to upgrade the .0 database timezone version. to the latest version which comes with the new release.WARNING: - Database contains INVALID objects prior to upgrade. The list of invalid SYS/SYSTEM objects was written to. registry$sys_inv_objs. The list of non-SYS/SYSTEM objects was written to. registry$nonsys_inv_objs. Use utluiobj.sql after the upgrade to identify any new invalid. objects due to the upgrade. USER PUBLIC has 27 INVALID objects.WARNING: - Your recycle bin contains 12 object(s). It is REQUIRED that the recycle bin is empty prior to upgrading. your database. The command: PURGE DBA_RECYCLEBIN. must be executed immediately prior to executing your upgrade.WARNING: - Database contains schemas with objects dependent on DBMS_LDAP package. Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. USER APEX_030200 has dependent objects.*Recommendations*Oracle recommends gathering dictionary statistics prior toupgrading the database.To gather dictionary statistics execute the following commandwhile connected as SYSDBA: EXECUTE dbms_stats.gather_dictionary_stats;*Oracle recommends reviewing any defined events prior to upgrading.To view existing non-default events execute the following commandswhile connected AS SYSDBA: Events: SELECT (translate(value,chr(13)|chr(10), ) FROM sys.v$parameter2 WHERE UPPER(name) =EVENT AND isdefault=FALSE Trace Events: SELECT (translate(value,chr(13)|chr(10), ) from sys.v$parameter2 WHERE UPPER(name) = _TRACE_EVENTS AND isdefault=FALSEChanges will need to be made in the init.ora or spfile.*Utlu112s.sqlSQL $ORACLE_HOME/rdbms/admin/utlu112s.sql.Oracle Database 11.2 Post-Upgrade Status Tool 06-20-2013 16:54:31.Component Current Version Elapsed TimeName Status Number HH:MM:SS.Oracle Server. VALID .0 00:07:41JServer JAVA Virtual Machine. VALID .0 00:02:12Oracle Workspace Manager. VALID .0 00:00:22OLAP Analytic Workspace. VALID .0 00:00:51OLAP Catalog. VALID .0 00:00:40Oracle OLAP API. VALID .0 00:00:16Oracle Enterprise Manager. VALID .0 00:02:53Oracle XDK. VALID .0 00:00:22Oracle Text. VALID .0 00:00:21Oracle XML Database. VALID .0 00:01:27Oracle Database Java Packages. VALID .0 00:00:09Oracle Multimedia. VALID .0 00:01:57Spatial. VALID .0 00:02:19Oracle Expression Filter. VALID .0 00:00:06Oracle Rules Manager. VALID .0 00:00:05Oracle Application Express. VALID 0.10Gathering Statistics. 00:01:59Total Upgrade Time: 00:23:47PL/SQL procedure successfully completed.catuppst.sqlSQL $ORACLE_HOME/rdbms/admin/catuppst.sqlTIMESTAMP-COMP_TIMESTAMP POSTUP_BGN 2013-06-20 16:57:19PL/SQL procedure successfully completed.This script will migrate the Baseline data on a pre-11g databaseto the 11g database. . Completed Moving the Baseline Data . . If there are no Move BL Data messages . above, then there are no renamed . baseline tables in the system. . . . Completed the Dropping of the . Renamed Baseline Tables . . If there are no Drop Table messages . above, then there are no renamed . baseline tables in the system. . .PL/SQL procedure successfully completed.0 rows created.Commit complete.Table created.2 rows created.1 row updated.2 rows updated.0 rows updated.Table dropped.Commit complete.0 rows updated.Commit complete.0 rows updated.Commit complete.0 rows updated.Commit complete.0 rows created.Commit complete.0 rows created.Commit complete.PL/SQL procedure successfully completed.TIMESTAMP-COMP_TIMESTAMP POSTUP_END 2013-06-20 16:57:20PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.Generating apply and rollback scripts.Check the following file for errors:/home/oracle/cfgtoollogs/catbundle/catbundle_PSU_SOC_GENERATE_2013Jun20_16_57_21.logApply script: /home/oracle/oracle11g3/rdbms/admin/catbundle_PSU
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 保險代理業(yè)務(wù)風(fēng)險管理考核試卷
- 女性健康管理考核試卷
- 搜索引擎的智能糾錯功能考核試卷
- 壓力容器在物流系統(tǒng)中的故障預(yù)測與維護系統(tǒng)構(gòu)建考核試卷
- 刀具材料抗粘附性研究考核試卷
- 機械式停車設(shè)備維護保養(yǎng)規(guī)范
- 機械產(chǎn)業(yè)鏈優(yōu)化
- 企業(yè)安全生產(chǎn)培訓(xùn)工作總結(jié)
- 婚戀教育主題班會課件
- 沈陽市第120中學(xué)2024-2025學(xué)年高二下學(xué)期第三次質(zhì)量監(jiān)測政治試卷(含答案)
- 正交異性鋼橋面板計算
- GB/T 32063-2015城鎮(zhèn)供水服務(wù)
- GB/T 27818-2011化學(xué)品皮膚吸收體外試驗方法
- GB 18667-2002道路交通事故受傷人員傷殘評定
- 防范和懲治統(tǒng)計造假、弄虛作假等違法違規(guī)行為的政策解讀(統(tǒng)計培訓(xùn)課件)
- 播下種子守護生命-基于種植活動的大班幼兒生命教育實踐研究
- 中關(guān)村東升科技園二期概念性規(guī)劃設(shè)計方案
- 2021年云南技師學(xué)院教師招聘試題及答案解析
- 2022年長沙水業(yè)集團有限公司校園招聘筆試模擬試題及答案解析
- 土地資源調(diào)查與評價 第三章 土地適宜性評價
- 002TD-SCDMA 無線網(wǎng)絡(luò)關(guān)鍵技術(shù)
評論
0/150
提交評論