有關(guān)oracle數(shù)據(jù)庫的解決方案_第1頁
有關(guān)oracle數(shù)據(jù)庫的解決方案_第2頁
有關(guān)oracle數(shù)據(jù)庫的解決方案_第3頁
有關(guān)oracle數(shù)據(jù)庫的解決方案_第4頁
有關(guān)oracle數(shù)據(jù)庫的解決方案_第5頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、謝謝觀賞有關(guān)oracle數(shù)據(jù)庫的解決方案1有關(guān)Oracle數(shù)據(jù)庫的解決方案問題:Oracle數(shù)據(jù)庫的OWSYSP表格被破壞,在沒有備份的情況下,它能夠以某種方式被恢復(fù)。在shell窗口下,執(zhí)行orastat命令,可以看到下列出錯信息:ORA-01115IOerrorreadingblockfromfile7ORA-01110datafile7:/owsysp_tbs.dbf解決步驟概括如下(注意:至少需要同時打開兩個xterm窗口):1. 在xterm(1)窗口登錄進(jìn)入oracle帳號,su-oracle,sun1oracle#svrmgrlSVRMGR>connectinternalS

2、VRMGR>startupmountSVRMGR>alterdatabasedatafile'/home1/OpenWorks/oracle/dbs/owsysp_tbs.dbf'offlinedrop;SVRMGR>alterdatabaseopen;SVRMGR>droptablespaceowsyspincludingcontentscascadeconstraints;2. 在xterm(2)窗口,su-oracle,并且執(zhí)行下列命令:sun1oracle#rm/home1/OpenWorks/oracle/dbs/owsysp_tbs.dbf3

3、. 返回到xterm(1)窗口,作SVRMGR>createtablespaceOWSYSPdatafile'/home1/OpenWorks/oracle/dbs/owsysp_tbs.dbf'size1M;SVRMGR>grantDBAtoowsyspwithADMINOPTION;SVRMGR>grantcreateprocedure,createsynonym,createtable,2 >createsequence,createdatabaselink,createtrigger,3 >createsession,createviewt

4、oowsysp;4 .返回到xterm(2)窗口,作sun1oracle44#$ORACLE_HOME/bin/impowsysp/owsyspINCTYPE=restoreFULL=yFILE=/home1/OpenWorks/dat/owsys/owsysp.dmp5 .返回到xterm(1)窗口,作SVRMGR>connectowsysp/owsysp;SVRMGR>exit;Sun1oracle65#sqlplusowsysp/owsyspSQL>INSERTINTOow_sysp_prj_security2 (project_name,passwd,create_d

5、ate,create_user_id)3 VALUES4 ('OWSYS','OWSYS',SYSDATE,USER);SQL>INSERTINTOow_sysp_prj_security5 (project_name,passwd,create_date,create_user_id)6 VALUES7 ('LMSYS','LMSYS',SYSDATE,USER);注意:你必須為各個存在的工區(qū)輸入口令,為了獲得工區(qū)和口令列表,執(zhí)行下列查詢:SVRMGR>selectusername,user_id,passwordf

6、romsys.dba_users;SQL>INSERTINTOow_sysp_prj_security8 (project_name,passwd,create_date,create_user_id)9 VALUES10 ('STWTST','30CA2A3A95BA8EEE',SYSDATE,USER);注意:或者,二者選一,你能夠提交你想要的條目,然后使用它ALTERUSERIDENTIFIEDBY;改變當(dāng)前工區(qū)的口令用以匹配你上面插入的條目SQL>commit;SQL>exit;6. 你現(xiàn)在將能夠成功地啟動oracle數(shù)據(jù)庫,但是我們將

7、首先關(guān)掉它sun1oracle#dbshutsun1oracle#lsnrctlstartsun1oracle#dbstart7. 執(zhí)行orastat命令,確認(rèn)每件事情都恢復(fù)正常.如果orastat報告log文件失效,你可以按如下所說解決這個問題:8. 如果oracle數(shù)據(jù)庫正在運行,就關(guān)掉它,輸入svrmgrlsun1oracle#svrmgrlSVRMGR>connectinternalSVRMGR>startupnomountSVRMGR>alterdatabasemountexclusive;SVRMGR>select*fromv$logfile;GROUP#S

8、TATUSMEMBER1STALE/home2/oracle/dbs/logg1m1owsun1.dbf1 STALE/home1/Openworks/oracle/dbs/logg1m2owsun1.dbf2 /home2/oracle/dbs/logg2m1owsun1.dbf3 /home1/OpenWorks/oracle/dbs/logg2m2owsun1.dbf4 /home2/oracle/dbs/logg3m1owsun1.dbf3/home1/OpenWorks/oracle/dbs/logg3m2owsun1.dbfSVRMGR>alterdatabasedroplogfilegroup1;SVRMGR>alterdatabaseaddlogfilegroup12>('/home2/oracle/dbs/logg1m1owsun1.dbf','/home1/OpenWorks/oracle/dbs/logg1m2owsun1.dbf')1 >size8Mreuse;SVRMGR>exit9 .這樣將能夠照顧到log文件的失效狀態(tài)。10 .關(guān)掉oracle數(shù)據(jù)庫并重新啟動它.運行orastat

溫馨提示

  • 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論