系統(tǒng)日常維護指導(dǎo)手冊-超詳細_第1頁
系統(tǒng)日常維護指導(dǎo)手冊-超詳細_第2頁
系統(tǒng)日常維護指導(dǎo)手冊-超詳細_第3頁
系統(tǒng)日常維護指導(dǎo)手冊-超詳細_第4頁
系統(tǒng)日常維護指導(dǎo)手冊-超詳細_第5頁
已閱讀5頁,還剩20頁未讀 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、系統(tǒng)日常維護指導(dǎo)手冊目錄1、目的 42、適用范圍 43、服務(wù)器及數(shù)據(jù)庫概述 43.1 服務(wù)器概述 43.2 數(shù)據(jù)庫概述 44、系統(tǒng)服務(wù)程序的詳細說明 54.1 系統(tǒng)服務(wù)程序的構(gòu)成 54.2 系統(tǒng)服務(wù)程序的啟動、關(guān)閉及維護管理 54.2.1 dhcp 主服務(wù) dhcp 主服務(wù)說明 dhcp 啟動、關(guān)閉及進程查看方法 配置說明 64.2.2 dhcp 從服務(wù) dhcp 從服務(wù)說明 dhcp 啟動、關(guān)閉及進程查看方法 配置說明 94.2.3 web 管理模塊 web 管理模

2、塊中主要目錄說明 web 管理模塊中各程序說明 web 站點啟動、關(guān)閉及進程查看方法 web 日志說明 日常維護 135、服務(wù)器硬件維護(略) 136、 linux 系統(tǒng)的日常維護 136.1 定期檢查磁盤空間 136.2 使用 top 工具監(jiān)視 cpu 及內(nèi)存的使用率 146.3 定期查看 root 郵件 146.4 定期查看系統(tǒng)日志 157、備份策略 157.1 備份方式 157.2 備份計劃 157.3 常見故障恢復(fù) 157.3.1 實例故障 167.3.2 介質(zhì)故障 169、數(shù)據(jù)庫的日常維護 189.1 檢

3、查數(shù)據(jù)庫的基本狀況 189.1.1 檢查 oracle 的進程 189.1.2 檢查 oracle 監(jiān)聽進程 199.1.3 檢查 oracle 實例狀態(tài) 209.2 檢查數(shù)據(jù)庫日志文件 219.3 檢查 oracle 對象的狀態(tài) 219.3.1 檢查 oracle 控制文件狀態(tài) 219.3.2 檢查 oracle 在線日志狀態(tài) 229.3.3 檢查 oracle 表空間的狀態(tài) 229.3.4 檢查 oracle 所有數(shù)據(jù)文件狀態(tài) 229.3.5 檢查 Oracle 所有回滾段的狀態(tài) 229.3.6 檢查 Oracle 所有表、索引、存儲過程、觸發(fā)器等對象的狀態(tài) 239.4 監(jiān)控數(shù)據(jù)庫表空間的

4、使用情況(字典管理表空間) 239.4.1 判斷是否需要碎片整理 239.4.2 判斷是否需要擴展表空間 249.5 查看數(shù)據(jù)庫的連接情況 259.6 術(shù)語解釋 2510、命令解釋 261、目的網(wǎng)e通寬帶網(wǎng)絡(luò)運營支撐系統(tǒng)使用的服務(wù)器中,服務(wù)器均采用red hat linux as 4操作系統(tǒng),數(shù)據(jù)庫版本為:oracle 10g,隨著業(yè)務(wù)的開展,oracle數(shù)據(jù)庫中存儲的數(shù)據(jù)量也不斷增大, 這樣操作系統(tǒng)和數(shù)據(jù)庫的日常維護就顯得十分重要。本手冊詳細描述了程序模塊,linux操作系統(tǒng),DHCP雙機熱備、負載平衡及oracle數(shù)據(jù) 庫等日常檢查的主要步驟,指導(dǎo)現(xiàn)場工程師對其進行監(jiān)控和維護。2、適用范圍

5、使用者為網(wǎng)e通寬帶網(wǎng)絡(luò)運營支撐系統(tǒng)維護工程師3、服務(wù)器及數(shù)據(jù)庫概述3.1服務(wù)器概述服務(wù)器數(shù)量:4臺,基本信息如下:服務(wù)器機器型號操作系統(tǒng)安裝的模塊主機名Ip地址主服務(wù) 器DELL PCRedHat linux AS4.0Cm鑒權(quán)數(shù) 據(jù)庫 業(yè)務(wù)支撐數(shù) 據(jù)庫主DHCP服 務(wù)oracle01eth0:0從服務(wù) 器DELL PCRedHat linux AS4.0從DHCP服務(wù)oracle02ethO: 13.2數(shù)據(jù)庫概述數(shù)據(jù)庫軟件分別安裝在主服務(wù)器上。/dev/mapper/VolGroupOO-LogV olOO 邏輯卷上ORACLE_BASE=/o

6、pt/oracle ORACLE_HOME=/opt/oracle/product/ 10.2.0 ORACLE_SID=oracmts4、系統(tǒng)服務(wù)程序的詳細說明4.1系統(tǒng)服務(wù)程序的構(gòu)成DHCP主程序:所在服務(wù)器主服務(wù)器(ip: 0)程序名稱Dhcpd所在目錄/opt/dpcpDHCP從程序:所在服務(wù)器從服務(wù)器(ip: 1)程序名稱Dhcpd所在目錄/opt/dpcp4.2系統(tǒng)服務(wù)程序的啟動、關(guān)閉及維護管理4.2.1 dhcp主服務(wù) dhcp主服務(wù)說明所在目錄程序名稱程序簡要說明/opt/dpcpDhcpdDhcp主程序/etc/d

7、hcpd.c onf主程序的配置文件/var/state/dhcp/dhcpd .l eases租約數(shù)據(jù)庫n dhcp啟動、關(guān)閉及進程查看方法1、啟動方法:輸入:cd /opt/dpcp./dhcpd 即可注意:請首先確認數(shù)據(jù)庫服務(wù)正常,數(shù)據(jù)庫監(jiān)聽正常。 輸出:rootlocalhost dhcp$ ./dhcpdIn ternet Systems Con sortium DHCP Server V3.0.4Copyright 2004-2006 In ternet Systems Con sortium.All rights reserved.For info, please

8、visit /sw/dhcp/Wrote 1 leases to leases file.Listening on LPF/eth0/00:0c:29:fb:d4:32/192.168.50/24Sending onLPF/eth0/00:0c:29:fb:d4:32/192.168.50/24Sending onSocket/fallback/fallback-net說明 :dhcp 啟動時,會啟動 1 個進程,正常情況下, dhcp 啟動的進程數(shù)為 1 個。2、關(guān)閉方法輸入: kill pid說明:pid為進程號,可使用進程查看獲得。如|-dhcpd(46

9、65),則進程id為4665,則kill 4665就可關(guān)閉 dhcp。3、進程查看輸入: rootlocalhost dhcp# pstree -p | grep dhcp 輸出:|-dhcpd(4665) 配置說明啟動配置文件: etc/dhcpd.conf 可使用 more 或者 tail 命令查看 配置服務(wù)配置,更改后需要重新啟動才能生效,該配置文件的設(shè)置需要與從服務(wù)器的配置 文件吻合。配置文件全文如下:# DHCP Server Configuration file.# see /usr/share/doc/dhcp*/dhcpd.conf.sample# ddns-up

10、date-style none; failover peer "buptdhcp"primary;address 0;port 519;peer address 1;peer port 520; max-response-delay 60;max-unacked-updates 10;mclt 600;split 128;load balance max seconds 3;subnet netmask #cisico1_cmsubnet netmas

11、k option routers ;filename "Disable.cm" next-server 0;default-lease-time 3600;pool failover peer "buptdhcp"deny dynamic bootp clients;range 54;#cisico1_iadshared-network cisico1_iadsubnet netmask op

12、tion routers ;option domain-name-servers 32, 50, 30; default-lease-time 3600;pool failover peer "buptdhcp"deny dynamic bootp clients;range 54;#cisico1_cpeshared-network cisico1_cpesubnet netmask optio

13、n routers ;option domain-name-servers 32, 50, 30;default-lease-time 3600;poolfailover peer "buptdhcp"deny dyn amic bootp clie nts; range 54;租約數(shù)據(jù)庫 /var/state/dhcp/dhcpd.leases可使用more或者tail命令查看記錄當前服務(wù)器與對方服務(wù)器的服務(wù)狀態(tài)與分配的ip租約

14、。示例如下:lease 54 starts 2 2007/11/27 13:15:22;ends 3 2007/11/28 13:15:22;tstp 3 2007/11/28 13:15:22;binding state active;n ext binding state free;hardware ethernet 00:11:1a:07:2e:8e;uid "001000021032007.216"opti on age nt.remote-id 0:11:1a:7:2e:8e;Dhcp狀態(tài)如下:failover peer " n a

15、me " state my state normal at 2007/11/27 13:15:22 ; peer state no rmal at 2007/11/27 13:15:22 ;4.2.2 dhcp從服務(wù) dhcp從服務(wù)說明所在目錄程序名稱程序簡要說明/opt/dpcpDhcpdDhcp主程序/etc/dhcpd.c onf主程序的配置文件/var/state/dhcp/dhcpd .l eases租約數(shù)據(jù)庫所在目錄程序名稱程序簡要說明/opt/dpcpDhcpdDhcp主程序/etc/dhcpd.c onf主程序的配置文件/var/state/dhcp/d

16、hcpd .l eases租約數(shù)據(jù)庫422.2 dhcp啟動、關(guān)閉及進程查看方法1、啟動方法:輸入:cd /opt/dpcp./dhcpd 即可注意:請首先確認數(shù)據(jù)庫服務(wù)正常,數(shù)據(jù)庫監(jiān)聽正常。 輸出:rootlocalhost dhcp$ ./dhcpdIn ternet Systems Con sortium DHCP Server V3.0.4Copyright 2004-2006 In ternet Systems Con sortium.All rights reserved.For info, please visit /sw/dhcp/Wrote

17、1 leases to leases file.Listening on LPF/eth0/00:0c:29:fb:d4:32/192.168.50/24Sending onLPF/eth0/00:0c:29:fb:d4:32/192.168.50/24Sending onSocket/fallback/fallback-net說明:dhcp啟動時,會啟動1個進程,正常情況下,dhcp啟動的進程數(shù)為1個。2、關(guān)閉方法輸入:kill pid說明:pid為進程號,可使用進程查看獲得。如|-dhcpd(4665),則進程id為4665,則kill 4665就可關(guān)閉dhcp。3、進程查看輸入:root

18、localhost dhcp# pstree -p | grep dhcp輸出:|-dhcpd(4665)配置說明啟動配置文件:etc/dhcpd.co nf可使用more或者tail命令查看.配置服務(wù)配置,更改后需要重新啟動才能生效,該配置文件的設(shè)置需要與主服務(wù)器的配置 文件吻合。配置文件全文如下:# DHCP Server Con figuratio n file.# see /usr/share/doc/dhcp*/dhcpd.c on f.sample#ddns-update-style none; failover peer "buptdhcp" s

19、econdary; address 1; port 520; peer address 0; peer port 519; max-response-delay 60; max-unacked-updates 10; mclt 600; #split 128; load balance max seconds 3;subnet netmask #cisico1_cmsubnet netmask option routers 10.10.128.

20、1; filename "Disable.cm" next-server 0;default-lease-time 3600;pool failover peer "buptdhcp" deny dynamic bootp clients; range 54;#cisico1_iadshared-network cisico1_iadsubnet netmask option routers ;option domain-

21、name-servers 32, 50, 30; default-lease-time 3600;poolfailover peer "buptdhcp" deny dynamic bootp clients;range 54;#cisico1_cpeshared-network cisico1_cpesubnet netmask option routers ;5

22、0,option domain-name-servers 32, 30;default-lease-time 3600;poolfailover peer "buptdhcp"deny dynamic bootp clients;range 54;租約數(shù)據(jù)庫 /var/state/dhcp/dhcpd.leases 記錄當前服務(wù)器與對方服務(wù)器的服務(wù)狀態(tài)與分配的 ip 租約。示例如下:lease 54 starts 2 2007/11/27 13:15:22;

23、ends 3 2007/11/28 13:15:22;tstp 3 2007/11/28 13:15:22;binding state active;next binding state free;hardware ethernet 00:11:1a:07:2e:8e;uid "001000021032007.216"option agent.remote-id 0:11:1a:7:2e:8e;Dhcp 狀態(tài)如下:failover peer " name " state my state normal at 2007/11/27 13:15:22 ;pe

24、er state normal at 2007/11/27 13:15:22 ;423 web管理模塊423.1 web管理模塊中主要目錄說明/opt/apache-2.0.52 為 apache模塊所在目錄 /opt/taiyuan為web程序存儲目錄 web管理模塊中各程序說明命令所在目錄: /opt/apache/b in命令命令說明apachectlApache HTTP服務(wù)器控制接口httpdApache超文本傳輸協(xié)議服務(wù)器abApache HTTP服務(wù)器性能測試工具apxsAPache功能擴展工具dbmma nage建立和更新DBM形式的基本認證文件htdigest建

25、立和更新摘要認證文件htpasswd建立和更新基本認證文件logresolve將Apache日志文件中的IP地址解析為主機名rotatelogs滾動Apache日志而無須終止服務(wù)器 web站點啟動、關(guān)閉及進程查看方法命令所在目錄命令命令說明/opt/apache/b in./apachectl start啟動httpd/opt/apache/b in./apachectl startssl啟動httpd并加載SSL服務(wù)/opt/apache/b in./apachectl stop關(guān)閉apache/opt/apache/b in./apachectl status查看apache

26、的狀態(tài) web日志說明Log 存放目錄為: /opt/apache/logs/opt/apache/logs/access_log為所有訪問網(wǎng)站的日志/opt/apache/logs/error_log 為錯誤信息日志/opt/apache/logs/httpd.pid 為主進程的 pid 號/opt/apache/logs/ssl_engine_log 為ssl引擎日志,即 ssl的運行日志,可以通過查看此日志 了解運行狀態(tài)及錯誤。/opt/apache/logs/ssl_request_log 為 ssl 請求日志即是哪個ip使用https ssi協(xié)議登錄web站點,請求的時

27、間,內(nèi)容,訪問的頁面等。 日常維護維護分為:業(yè)務(wù)維護及系統(tǒng)維護 業(yè)務(wù)維護就是,利用系統(tǒng)管理員的身份,查看操作日志 系統(tǒng)維護是:定期查看系統(tǒng)日志, apache 日志等,看是否有運行錯誤,并定期備份日志。5、服務(wù)器硬件維護(略)6、 linux 系統(tǒng)的日常維護6.1 定期檢查磁盤空間 使用 df 顯示磁盤空間 輸入:oraclelocalhost server$ df 輸出:Filesystem1K-blocksUsed Available Use% Mounted on/dev/cciss/c0d0p21079383367612144948432088% /dev/cciss/c

28、0d0p1101086123088355913% /bootnone2073908420739041% /dev/shm/dev/cciss/c0d0p530976636185056292180161% /home說明:這里顯示了人/boot、/home分區(qū)掛載的系統(tǒng)分區(qū)使用的大小,磁盤空間以k為單位。可以加參數(shù) -horaclelocalhost server$ df -hFilesystemSizeUsed Avail Use% Mounted on/dev/cciss/c0d0p2103G7.3G91G8% /dev/cciss/c0d0p199M13M82M13% /bootnone2

29、.0G4.0K2.0G1% /dev/shm/dev/cciss/c0d0p530G181M28G1% /home當某空間使用率超過85%時,通過du查看是哪些文件占用的空間比較大例如/home使用了 85%cd /home以root用戶查看su輸入root用戶密碼rootlocalhost /# du -m -max-depth=1-m是以M大小顯示-max-depth=1 表示只是一級子目錄的大小,如果想查看二級的就寫為2找出占用很大的文件,經(jīng)判斷后決定刪除或轉(zhuǎn)移。6.2 使用 top 工具監(jiān)視 cpu 及內(nèi)存的使用率每隔5秒,top工具確定哪些進程消耗最多的cpu時間,并按遞減順序在屏幕

30、顯示。輸入: oraclelocalhost /$ top輸出:top - 10:52:46 up 6 days, 39 min, 2 users, load average: 0.12, 0.09, 0.02 Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2% us, 0.2% sy, 0.0% ni, 99.3% id, 0.4% wa, 0.0% hi, 0.0% si Mem: 8247956k total, 1828612k used, 6419344k free, 119476k b

31、uffersSwap:8385920k total,0k used,8385920k free, 1526064k cachedPID USER PRNIVIRTRESSHR S %CPU %MEMTIME+ COMMAND1 root160 3004552472 S0.00.00:01.02 init2 rootRT0000 S0.00.00:01.28 migration/03 root3419000 S0.00.00:00.04 ksoftirqd/04 rootRT0000 S0.00.00:01.28 migration/15 root3419000 S0.00.00:00.04 k

32、softirqd/16 rootRT0000 S0.00.00:00.65 migration/2說明:當發(fā)現(xiàn)個別進程占用率很高,可以通過用“ps -axj | grep進程名”查看這個進程在進行什么操作,如果發(fā)現(xiàn)這個進程持續(xù)的時間很長,而且非系統(tǒng)必要進程;可以通過“ kill -9”進程的PID號,將進程殺死。(不確定情況下,請不要使用);退出 top 用 ctrl+c。6.3 定期查看 root 郵件輸入:oraclelocalhost log$ su -lPassword:rootlocalhost root# mail輸出:1 rootlocalhost.localFri Sep8 1

33、6:2318/704"HP Insight ManagementAgents Trap Alarm"N2 rootlocalhost.localFri Sep8 16:2318/684"HP Agent Trap Alert"N3 rootlocalhost.localFri Sep8 16:2319/748"HP Insight ManagementAgents Trap Alarm"說明:前面為N的表示新郵件可以在&后面輸入1代表看第一封信,ctrl+c表示退出查看這封信,h顯示所有的 如果都看過的郵件,就可以通過d來刪除

34、如果刪除 1 10就用&d 1-10 這樣就會刪除 1-10的信。6.4 定期查看系統(tǒng)日志系統(tǒng)的日志存儲于 /var/log 目錄下,需要定期查看,常用日志說明如下:boot.log: 該文件記錄了系統(tǒng)在引導(dǎo)過程中發(fā)生的事件,就是 Linux 系統(tǒng)開機自檢過程顯示 的信息maillog: 該日志文件記錄了每一個發(fā)送到系統(tǒng)或從系統(tǒng)發(fā)出的電子郵件的活動 messages: 該日志文件是許多進程日志文件的匯總,從該文件可以看出任何入侵企圖或成 功的入侵lastlog: 該日志文件記錄最近成功登錄的事件和最后一次不成功的登錄事件,由 login 生成wtmp: 該日志文件永久記錄每個用戶登錄、

35、注銷及系統(tǒng)的啟動、停機的事件xferlog:該日志文件記錄 FTP會話,可以顯示出用戶向FTP服務(wù)器或從服務(wù)器拷貝了什么 文件cron: 該日志文件記錄 crontab 守護進程 crond 所派生的子進程的動作,前面加上用戶、登 錄時間和PID,以及派生出的進程的動作7、備份策略7.1 備份方式為了保證數(shù)據(jù)庫的高安全性, 目前我們采用的數(shù)據(jù)庫備份方式為物理備份和邏輯備份 相結(jié)合的方式,數(shù)據(jù)庫歸檔模式為自動歸檔模式。這樣當數(shù)據(jù)庫出現(xiàn)故障時,我們就可以 利用備份文件與歸檔方法相結(jié)合,作數(shù)據(jù)庫 “最新狀態(tài) ”的恢復(fù)。7.2 備份計劃 通過自動備份腳本實現(xiàn)每天進行一次熱備份及邏輯備份,每周進行一次冷

36、備份。所備 份的數(shù)據(jù)文件存儲于磁陣上的硬盤。7.3 常見故障恢復(fù)我們首先從 /opt/oracle/admin/oracmts/bdump 下的日志文件判斷是什么故障。通過查看 v$recover_file來確定哪些文件需要恢復(fù),通過查看v$datafile視圖查看文件ID和文件名之間的相關(guān)性通過下面的命令查看需要恢復(fù)的數(shù)據(jù)文件的文件ID號:select file#, online, error from v$recover_file;通過視圖返回名字和相應(yīng)的文件 ID:select name, file# from v$datafile; 通過這些信息,決定對哪些文件進行恢復(fù),及其采用的恢復(fù)

37、方式。7.3.1 實例故障當oracle實例由于突然斷電或者操作系統(tǒng)故障而崩潰時,可以通過輸入dbstart即可開啟數(shù)據(jù)庫,無須發(fā)布恢復(fù)命令,oracle會自動執(zhí)行崩潰恢復(fù),最好啟動前后檢查日志文件7.3.2 介質(zhì)故障介質(zhì)故障發(fā)生在數(shù)據(jù)庫結(jié)構(gòu)組織出現(xiàn)毀壞時,在這些組織中數(shù)據(jù)庫文件不能進行讀 寫。在數(shù)據(jù)庫打開的情況下,如果是system表空間的數(shù)據(jù)文件出現(xiàn)介質(zhì)失敗,那么oracle需要在mount狀態(tài)下恢復(fù)其數(shù)據(jù)文件,如果是其他表空間,可以只對介質(zhì)失敗涉及到的數(shù)據(jù)文件進行恢復(fù),即在數(shù)據(jù)庫打開 的狀態(tài)下進行恢復(fù)。步驟如下:1確定需要恢復(fù)的數(shù)據(jù)文件2使數(shù)據(jù)文件脫機 3拷貝數(shù)據(jù)文件備份到原目標地址4恢

38、復(fù)表空間或數(shù)據(jù)文件 5使表空間或數(shù)據(jù)文件聯(lián)機 例: 當出現(xiàn)以下信息時,說明是數(shù)據(jù)庫的system表空間出現(xiàn)了問題。ERROR:ORA-00604: error occurred at recursive SQL level 1ORA-01116: error in opening database file 1ORA-01110: data file 1: '/opt/oracle/oradata/oracmts/system01.dbf'ORA-27041: unable to open fileLinux Error: 2: No such file or director

39、yAdditional information: 3System 出現(xiàn)介質(zhì)失敗,表示被誤刪或被損壞,可以執(zhí)行如下:1)首先登錄 SQL*PLUS 并啟用 SYSDBA 權(quán)限輸入: :sqlplus user/passwdoracmts;connect / as sysdba; (啟動 SYSDBA 權(quán)限) shutdown abort (關(guān)閉數(shù)據(jù)庫) startup mount (加載數(shù)據(jù)庫)也可以通過查看視圖,確定哪個文件需要恢復(fù)SQL> select file#,error from v$recover_file;FILE# ERROR1 FILE NOT FOUND 查看 v$da

40、tafile 視圖查看對應(yīng)關(guān)系 SQL> select file#,name from v$datafile;FILE#NAME1/opt/oracle/oradata/oracmts/system01.dbf2 /opt/oracle/oradata/oracmts/undotbs01.dbf3 /opt/oracle/oradata/oracmts/sysaux01.dbfFILE#NAME4 /opt/oracle/oradata/oracmts/users01.dbf 知道要恢復(fù)的是 1( system01.dbf ): 2)在 SQL> 提示符下輸入 alter data

41、base datafile '/opt/oracle/oradata/oracmts/system01.dbf' offline; 3)再打開一個終端: 將備份數(shù)據(jù)文件拷貝到原目標地址,即: cp /opt/backup/system01.dbf /opt/oracle/oradata/oracmts/ 4)然后進行恢復(fù)SQL> recover datafile 1; 或 recover datafile '/opt/oracle/oradata/oracmts/system01.dbf' 如果不需要歸檔日志文件進行恢復(fù),即輸出Media recovery

42、 complete. 如果需要歸檔日志文件參與恢復(fù),即輸出:ORA-00279: change 2246878 generated at 07/22/2005 16:28:13 needed for thread 1ORA-00289: suggestion : /opt/oracle/oradata/archive /1_167_562355694.dbfORA-00280: change 2246878 for thread 1 is in sequence #167Specify log: <RET>=suggested | filename | AUTO | CANCEL

43、輸入: auto 即可自動完成恢復(fù)。輸出:ORA-00279: change 2366990 generated at 07/25/2005 00:00:09 needed for thread 1ORA-00289: suggestion : /opt/oracle/oradata/archive/1_185_562355694.dbfORA-00280: change 2366990 for thread 1 is in sequence #185ORA-00278: log file '/opt/oracle/oradata/archive /1_184_562355694.db

44、f' no longer needed for thisrecoveryORA-00279: change 2375106 generated at 07/25/2005 04:00:54 needed for thread 1ORA-00289: suggestion : /opt/oracle/oradata/archive /1_186_562355694.dbfORA-00280: change 2375106 for thread 1 is in sequence #186ORA-00278: log file '/opt/oracle/oradata/archive

45、 /1_185_562355694.dbf' no longer needed for thisrecoveryLog applied.Media recovery complete. (表示恢復(fù)結(jié)束)5)在 SQL> 提示符下輸入alter database datafile '/opt/oracle/oradata/oracmts/system01.dbf' online; 6)打開數(shù)據(jù)庫即可,在 SQL> 提示符下輸入alter database open 其他數(shù)據(jù)文件恢復(fù)方法類似,只需要把數(shù)據(jù)文件的名字更改即可。 注:如果維護工程師沒有數(shù)據(jù)庫恢復(fù)經(jīng)驗

46、,或判斷不出數(shù)據(jù)庫的故障原因,請聯(lián)系我 們的工程師,我們一起協(xié)商解決。9、數(shù)據(jù)庫的日常維護9.1 檢查數(shù)據(jù)庫的基本狀況 主要介紹如何對數(shù)據(jù)庫的基本情況進行檢查,內(nèi)容共分三部分,分別為:檢查 oracle 的進程;檢查oracle監(jiān)聽進程;檢查oracle實例狀態(tài)。9.1.1 檢查 oracle 的進程輸入: ps -ef |grep "ora_" |grep -v grep輸出:5000:00 ora_pmon_oracmts5000:05 ora_psp0_oracmts1 8510 8510 8510 ?-1 Ss1 8512 8512 8512 ?-1 Ss18514

47、85148514 ?-1Ss5000:00 ora_mman_oracmts1851685168516 ?-1Ss5000:04 ora_dbw0_oracmts1851885188518 ?-1Ss5000:04 ora_lgwr_oracmts1852085208520 ?-1Ss5000:11 ora_ckpt_oracmts1852285228522 ?-1Ss5000:09 ora_smon_oracmts1852485248524 ?-1Ss5000:00 ora_reco_oracmts1852685268526 ?-1Ss5000:05 ora_cjq0_oracmts1852

48、885288528 ?-1Ss5000:14 ora_mmon_oracmts1853085308530 ?-1Ss5000:05 ora_mmnl_oracmts1853285328532 ?-1Ss5000:00 ora_d000_oracmts1853485348534 ?-1Ss5000:00 ora_s000_oracmts1853985398539 ?-1Ss5000:00 ora_arc0_oracmts1854185418541 ?-1Ss5000:00 ora_arc1_oracmts1854585458545 ?-1Ss5000:00 ora_qmnc_oracmts185

49、8085808580 ?-1Ss5000:00 ora_q000_oracmts1858385838583 ?-1Ss5000:00 ora_q001_oracmts說明:在檢查 oracle 的進程命令輸出后,輸出顯示至少應(yīng)包括以下一些進程:oracle 寫數(shù)據(jù)文件的進程,輸出顯示為: oracle 寫日志文件的進程,輸出顯示為: oracle 監(jiān)聽實例狀態(tài)的進程,輸出顯示為:ora_dbw0_oracmtsora_lgwr_oracmtsora_smon_oracmts”ora_pmon_oracmts”oracle 監(jiān)聽客戶端連接進程狀態(tài)的進程,輸出顯示為:ora_arc0_oracmt

50、s”“ ora_ckpt_oracmtsa丄 ”ora_reco_oracmts”oracle 進行歸檔的進程,輸出顯示為: oracle 進行檢查點的進程,輸出顯示為: oracle 進行恢復(fù)的進程,輸出顯示為:注:上面進程中的 oracmts是數(shù)據(jù)庫的實例名,必須為oracmts,否則為錯誤。9.1.2 檢查 oracle 監(jiān)聽進程輸入: lsnrctl status輸出:LSNRCTL for Linux: Version .0 - Production on 24-OCT-2006 17:22:28 Copyright (c) 1991, 2005, Oracle. A

51、ll rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle02)(PORT=1521)STATUS of the LISTENERAliasVersionLISTENERTNSLSNR for Linux: Version .0 - ProductionStart DateUptimeTrace LevelSecuritySNMPListener Parameter FileListener Log File24-OCT-2006 17:22:230 days 0 hr. 0

52、 min. 5 secoffON: Local OS AuthenticationON/opt/oracle/product/10.2.0/network/admin/listener.ora/opt/oracle/product/10.2.0/network/log/listener.logListening Endpoints Summary.(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle02)(PORT=1521) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)Services Sum

53、mary.Service "PLSExtProc" has 1 instance(s).Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service.Service "oracmts" has 1 instance(s).Instance "oracmts", status UNKNOWN, has 1 handler(s) for this service.The command completed successfully 說明

54、:“Services Summary”項表示oracle的監(jiān)聽進程正在監(jiān)聽哪些數(shù)據(jù)庫的實例,輸出顯示 中至少應(yīng)該有"oracmts”這一項。9.1.3 檢查 oracle 實例狀態(tài)輸入:oraclelocalhost oracle$ sqlplus /nologSQL> connect / as sysdba;SQL> select instance_name,version,status,database_status from v$instance; 輸出:INSTANCE_NAME VERSIONSTATUSDATABASE_STATUSoracmts.0OPENACTIVE說明:其中“STATUS ”表示oracle當前的狀態(tài),必須為 “OPEN”; “DATABASE_STATUS 表示oracle當前數(shù)據(jù)庫的狀態(tài),必須為“ ACTIVE ”。輸入:SQL> archive log list; 輸出:Archive ModeEnabl

溫馨提示

  • 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)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論