<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    姿姿霸霸~~!
    貴在堅持!
    posts - 106,  comments - 50,  trackbacks - 0
    這兩天遇到客戶因為誤操作,將RAC環境下的所有共享存儲格式化掉了,客戶只有一個最近的RMAN的0級全備(無數據文件,無控制文件,無歸檔日志,無redo日志),需要幫忙恢復。將大致的恢復過程記錄一下。

    0.恢復共享存儲是第一步,給存儲原廠打電話,原廠推是os的問題,讓給os打電話,結果只能初始化了,最后只能恢復到被識別的狀態,一切從頭開始。

    1.因為集群軟件是裝在本地的,所以恢復rac的集群環境,只需要將ocr和vdisk重新配置一下,就可以了??梢詧绦衦oot.sh腳本來進行重新的配置,如果中間報一個已經被配置過的提示,那就先用dd清除ocr和vdisk的信息,并刪除相應的目錄文件,如下:
    rm -rf /usr/tmp/.oracle /var/tmp/.oracle /tmp/.oracle /etc/oracle/* /var/opt/oracle/*  
    rm -rf /etc/init.cssd /etc/init.crs* /etc/init.evmd /etc/init.d/init.cssd /etc/init.d/init.crs  
    rm -rf /etc/init.d/init.crsd /etc/init.d/init.evmd /etc/rc3.d/K96init.crs /etc/rc3.d/S96init.crs  
    rm -rf /etc/rc.d/rc2.d/K96init.crs /etc/rc.d/rc2.d/S96init.crs

    2.恢復完集群環境之后,開始恢復數據庫。因為詢問到客戶有去年年底的一個RMAN的0級全備,以及控制文件的快照沒有放到共享存儲上,故可以采用重建控制文件+restore備份的方法來恢復。中途遇到很多問題,因為所有的日志備份均放到共享存儲下的,故這次恢復在recover的步驟時是沒有日志用來補充的。所以restore databse until 時間后,再recover,再alter database open resetlogs后,會報一個需要恢復數據文件的錯誤提示,操作的時候運氣不好,剛好遇到的是需要恢復datafile 1,再折騰了幾個小時候,終于發現按照正常的手段是行不通的.

    3.因為沒有日志,無法使得數據庫達到一致性,所以只有采取修改隱藏參數的辦法來忽略數據庫的不一致,來強行打開數據庫.先將數據庫打到mount狀態,在做完restore,recover之后,將隱藏參數修改 alter system set "_allow_resetlogs_corruption"=true scope=spfile;再shutdown數據庫,啟動到mount狀態之后,alter database open resetlogs; resetlogs打開數據庫后,運氣仍然不是太好,又遇到了ORA-00600 2662號的錯誤.

    4. 當使用修改_allow_resetlogs_corruption ,再打開數據庫時遇到了ORA-00600 2662號的錯誤, 如果SCN相差不多,可以通過多次重起數據庫解決 ,但是這次遇到的SCN相差很大(通過查v$datafile和v$datafile_header的CHECKPOINT_CHANGE#來判斷),這個時候只有再修改另外一個隱藏參數 _minimum_giga_scn來解決問題._minimum_giga_scn的作用是推進SCN號,該參數值的單位是billion,也就是說設置了該參數后,SCN號會變成XX* (1024*1024*1024) ,XX可以通過2662的幾個參數來確定. 2662后的參數[2662],[a],[b],[c],[d],[e]…[a] Current SCN WRAP,[b] Current SCN BASE,[c] dependent SCN WRAP,[d] dependent SCN BASE,[e] Where present this is the DBA where the dependent SCN came from.

    5.當修改了2個隱藏參數之后,數據庫終于能啟動了,但是alert日志還是會報一些600的錯誤,暫時忽略.用exp(expdp可能會報錯)將數據全部導出,重建新的實例,再用imp導入數據到新的庫中.exp的時候需要注意一個參數compress,這個參數可以降低HWM,使的imp的時候,時間相對盡量少一些.
    posted @ 2012-04-12 00:24 xrzp 閱讀(399) | 評論 (0)編輯 收藏
    早上做個實驗,update數據的時候報錯ora-30036:無法按8擴展段(在還原表空間‘undotbs_new’中)

    1.查詢了一下undo表空間的使用,發現已經超過了80%
    SELECT a.tablespace_name as tablespace_name,
           to_char(b.total
    /1024/1024,999999.99as Total,
           to_char((b.total
    -a.free)/1024/1024,999999.99as Used,
           to_char(a.free
    /1024/1024,999999.99as Free,
           to_char(
    round((total-free)/total,4)*100,999.99as Used_Rate
    FROM (SELECT tablespace_name, sum(bytes) free FROM DBA_FREE_SPACE GROUP BY tablespace_name) a,
         (
    SELECT tablespace_name, sum(bytes) total FROM DBA_DATA_FILES GROUP BY tablespace_name ) b
    WHERE a.tablespace_name=b.tablespace_name
      
    AND a.tablespace_name='UNDOTBS_NEW'
    ORDER BY a.tablespace_name;

    2.將undo表空間大小重新加大點,解決問題~
    alter database datafile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\UNTOTBS_NEW_01.DBF' resize 2048M;
    posted @ 2011-11-07 10:30 xrzp 閱讀(18092) | 評論 (0)編輯 收藏
    v$sqltext:存儲的是完整的SQL,SQL被分割
    v$sqlarea:存儲的SQL 和一些相關的信息,比如累計的執行次數,邏輯讀,物理讀等統計信息.v$sqlarea 忽略了執行計劃等差異,只是在形式上sql文本看起來一樣.相當于做了個聚合,是多個不同執行計劃的sql的聚合和累計信息 
    v$sql:存儲的是具體的SQL 和執行計劃相關信息,v$sqlarea 可以看做 v$sql 根據 sqltext 等 做了 group by 之后的信息
    v$sql_plan:代表了具體的sql的執行計劃,通過下面3個字段做連接(與v$sql)
    ADDRESS RAW(4),HASH_VALUE NUMBER,CHILD_NUMBER NUMBER
    posted @ 2011-11-07 00:00 xrzp 閱讀(358) | 評論 (0)編輯 收藏
    這幾天安裝oracle,檢查包的時候,發現一些包沒有裝上,使用rpm來裝的時候,又發現包的依耐性很重,所以就搭建一個本地的源,使用yum install來安裝.

    1.掛載安裝介質 
    mount /dev/cdrom /mnt/cdrom

    如果是實體機:
    mount 
    -o loop  鏡像所在目錄  掛載點

    2.vi /etc/yum.repos.d/server.repo
    [dange]                                        #隨意填
    name
    =red hat                                   #隨意填
    baseurl
    =file:///mnt/cdrom/RedHat/Server        #光盤掛載,Server目錄所在路徑
    enable
    =1                                       #yum開關
    gpgcheck
    =1                                     #是否檢查密鑰
    gpgkey
    =file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release      #密鑰所在地

    3.如果安裝軟件包提示沒有key的話導入key
    cd /mnt/cdrom
    rpm 
    --import  RPM-GPG-KEY-redhat-release   //安裝驗證文件,導入key
    yum list                                   //列出倉庫中的所有軟件,查看yum是否搭建成功
    yum clean  
    all                             //清空yum倉庫

    4.OK,可以直接使用yum install了
    posted @ 2011-10-20 09:22 xrzp 閱讀(418) | 評論 (0)編輯 收藏
    1.現象:裝clusterware,執行第二個腳本的時候可能會報錯
    Running vipca(silent) for configuring nodeapps
    /u01/app/oracle/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory


    2. 解決方案:分別修改 $CRS_HOME/bin 目錄下的srvctl和vipca文件,在vipca文件ARGUMENTS=""行之前和srvctl文件的export LD_ASSUME_KERNEL行之后增加 unset LD_ASSUME_KERNEL 語句.
     修改之后再用root用戶執行vipca就可以了.
    posted @ 2011-10-16 23:31 xrzp 閱讀(321) | 評論 (0)編輯 收藏
    Mount Options for Oracle files when used with NAS devices [ID 359515.1]

     修改時間 23-SEP-2011     類型 BULLETIN     狀態 PUBLISHED 

    In this Document
      Purpose
      Scope and Application
      Mount Options for Oracle files when used with NAS devices
         RAC  
          Single Instance
      References


     

     

    Applies to:

    Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.2.0.2 - Release: 10.1 to 11.2
    Information in this document applies to any platform.
    Oracle Clusterware, Oracle Real Application Clusters, NAS

    Purpose

    The purpose of this bulletin is to document the options with which the NAS systems should be mounted. This note does not cover the new dNFS feature that was introduced in 11g.

    Scope and Application

    This document is relevant to all environments using Oracle Clusterware & RAC. 

    Mount Options for Oracle files when used with NAS devices

    RAC  


    In the table below 
    • Binaries is the shared mount points where the Oracle Home and CRS_HOME is installed.
    • Datafiles includes Online Logs, Controlfile and Datafiles
    • nfsvers and vers are identical on those OS platforms that has nfsvers.  The ver option is an alternative to the nfsvers option. It is included for compatibility with other operating systems
    • Please note that the mount options on each of the following cells are applicable only to those type of files listed in the column heading.
    • For RMAN backup sets, image copies, and Data Pump dump files, the "NOAC" mount option should not be specified - that is because RMAN and Data Pump do not check this option and specifying this can adversely affect performance. 

    Operating System

    Mount options for    Binaries ##

    Mount options for Oracle DatafilesMount options for CRS Voting Disk and OCR
    Sun Solaris *

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,proto=tcp,noac,

    vers=3,suid

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,proto=tcp,noac,
    forcedirectio, vers=3,suid
    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,proto=tcp,vers=3,
    noac,forcedirectio
    AIX (5L) **

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,proto=tcp,

    vers=3,timeo=600

    cio,rw,bg,hard,nointr,rsize=32768,
    wsize=32768,proto=tcp,noac,
    vers=3,timeo=600

    cio,rw,bg,hard,intr,rsize=32768,
    wsize=32768,tcp,noac,
    vers=3,timeo=600

    HPUX 11.23 ***  --rw,bg,vers=3,proto=tcp,noac,
    hard,nointr,timeo=600,
    rsize=32768,wsize=32768,suid
    rw,bg,vers=3,proto=tcp,noac,
    forcedirectio,hard,nointr,timeo=600,
    rsize=32768,wsize=32768,suid
    rw,bg,vers=3,proto=tcp,noac,
    forcedirectio,hard,nointr,timeo=600
    ,rsize=32768,wsize=32768,suid
    WindowsNot SupportedNot SupportedNot Supported
    Linux x86
    #
    ****

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,tcp, vers=3,
    timeo=600, actimeo=0

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,tcp,actimeo=0,
    vers=3,timeo=600

    rw,bg,hard,nointr,rsize=32768,
    wsize=32768,tcp,noac,actimeo=0,
    vers=3,timeo=600

    Linux x86-64 #
    ****
    rw,bg,hard,nointr,rsize=32768,
     wsize=32768,tcp,vers=3,
    timeo=600, actimeo=0
    rw,bg,hard,nointr,rsize=32768, 
    wsize=32768,tcp,actimeo=0, 
    vers=3,timeo=600
    rw,bg,hard,nointr,rsize=32768, 
    wsize=32768,tcp,noac,vers=3,
    timeo=600,actimeo=0
    Linux - Itaniumrw,bg,hard,nointr,rsize=32768, 
    wsize=32768,tcp,vers=3,
    timeo=600, actimeo=0
    rw,bg,hard,nointr,rsize=32768, 
    wsize=32768,tcp,actimeo=0, 
    vers=3,timeo=600
    rw,bg,hard,nointr,rsize=32768, 
    wsize=32768,tcp,noac,vers=3,
    timeo=600,actimeo=0

    * NFS mount option “forcedirectio” is required on Solaris platforms when mounting the OCR/CRS files when using Oracle 10.1.0.4 or 10.2.0.2 or later (Oracle unpublished bug 4466428) 
    ** AIX is only supported with NAS on AIX 5.3 TL04 and higher with Oracle 10.2.0.1 and later (NetApp) 
    *** NAS devices are only supported with HPUX 11.23 or higher ONLY 
    **** As per BUG 11812928, the 'intr' & 'nointr' are deprecated in OEL 5.6 kernels and up including Oracle Linux 6. It is harmless to still include it, but the "NFS: ignoring mount option: nointr" will appears. This message can be ingnored.


    # These mount options are for Linux kernels 2.6 and above for older kernels please check Note 279393.1

    Due to Unpublished bug 5856342, it is necessary to use the following init.ora parameter when using NAS with all versions of RAC on Linux (x86 & X86-64 platforms) until 10.2.0.4. This bug is fixed and included in 10.2.0.4 patchset.
    filesystemio_options = DIRECTIO

     Single Instance

     

    Operating System

    Mount options for BinariesMount options for Oracle Datafiles
    Sun Solaris *
    (8, 9, 10)

    rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,proto=tcp,suid

    rw,bg,hard,rsize=32768,wsize=32768,vers=3,[forcedirectio or llock],nointr,proto=tcp,suid
    AIX (5L) **

    rw,bg,hard,rsize=32768,wsize=32768,vers=3,intr,timeo=600,proto=tcp

    rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp

    HPUX 11.23 ****rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp,suidrw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp, suid, forcedirectio
    WindowsNot SupportedNot Supported
    Linux x86
    #
    rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcprw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,actimeo=0*
    Linux x86-64 #rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcprw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,actimeo=0*
    Linux - Itaniumrw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcprw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp

     

    * actime=0 or noac can be used


    References

    http://now.netapp.com/Knowledgebase/solutionarea.asp?id=kb7518
    http://linux.oracle.com/pls/apex/f?p=102:2:3947951439689189::NO::P2_VC_ID:424

    顯示相關信息 相關內容


    產品
    • Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
    關鍵字
    CLUSTERWARE; CRS; NAS; NETAPP
    錯誤
    KCCCHB_3; ORA-600[KCCCHB_3]

    posted @ 2011-10-16 23:16 xrzp 閱讀(1544) | 評論 (0)編輯 收藏
    1.檢查時區:
    檢查/etc/sysconfig/clock設置:
    ZONE
    ="Asia/Shanghai"(Linux會拷貝/usr/share/zoneinfo/Asia/Shanghai 到/etc/locatime作為本地時區,如果我們需要改變時區,那么只需要修改/etc/sysconfig/clock,并且將對應的/usr/share/zoneinfo/Asia的時區文件拷貝成/etc/localtime即可)
    UTC
    =false
    ARC
    =false

    2.安裝NTP包:
    rpm -ivh ntp-xxxxxx.rpm
    或者:
    yum install ntp

    3.編輯/etc/ntp.conf文件:
    服務端:
    server 
    127.127.1.0
    fudge 
    127.127.1.0 stratum 11
    driftfile 
    /var/lib/ntp/drift
    broadcastdelay 
    0.008
    客戶端:
    server 
    192.168.0.11 prefer #192.168.0.11為服務端的ip地址
    driftfile 
    /var/lib/ntp/drift
    broadcastdelay 
    0.008

    4.重啟ntp服務:
    service ntpd restart

    5.等待5分鐘,測試客戶端更新時間:
    ntpdate 192.168.0.11 
    Oct 
    16 21:09:28 ntpdate[8316]: step time server 192.168.0.11  offset -1791.709393 sec

    6.在客戶端將更新時間加入crontab:
    (1).cp /usr/sbin/ntpdate /usr/bin/
    (
    2).crontab –e
    加入
    */1 * * * * /usr/sbin/ntpdate 192.168.0.11 ; hwclock –w

    7.加入自啟動
    chkconfig ntpd on
    posted @ 2011-10-16 23:14 xrzp 閱讀(424) | 評論 (0)編輯 收藏

    gunzip xxx.cpio.gz

    cpio -idcmv < xxx.cpio

    posted @ 2011-10-16 23:02 xrzp 閱讀(464) | 評論 (1)編輯 收藏
    1.查看版本
    crsctl query crs softwareversion
    crsctl query crs activeversion
    2.管理
    srvctl start nodeapps -<node1 hostname> 
    srvctl start nodeapps 
    -<node2 hostname> 
    srvctl start asm 
    -<node1 hostname> 
    srvctl start asm 
    -<node2 hostname> 
    srvctl start 
    database -<database name> 
    srvctl start service 
    -<database name> -<service name> 
    crs_stat 
    -t

    srvctl stop service 
    -<database name> -<service name> 
    srvctl stop 
    database -<database name> 
    srvctl stop asm 
    -<node1 hostname> 
    srvctl stop asm 
    -<node2 hostname> 
    srvctl stop nodeapps 
    -<node1 hostname> 
    srvctl stop nodeapps 
    -<node2 hostname> 
    crs_stat 
    -
    posted @ 2011-10-16 23:01 xrzp 閱讀(264) | 評論 (0)編輯 收藏
    當服務器沒有裝圖形化界面的時候,如不能使用xhost之類的命令,就不能使用vnc了,那這個時候可以使用xmanager來代替

    1.網上可以下載一個xmanager企業版,下載完后打開Xbrowser,在help-->about Xbrowser中輸入注冊碼

    2.在服務器端
    DISPLAY=192.168.X.X:0.0
    export DISPLAY
    echo $DISPLAY

    3.使用xmanager的xshell來打開圖形化界面.(有可能會提醒運行一個rootpre之類的腳本)
    posted @ 2011-10-14 01:35 xrzp 閱讀(513) | 評論 (0)編輯 收藏
    僅列出標題  下一頁

    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    好友的blog

    搜索

    •  

    積分與排名

    • 積分 - 117322
    • 排名 - 500

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久精品九九亚洲精品| 亚洲第一页日韩专区| 国产成人亚洲精品青草天美| 国产亚洲视频在线| 国产成人免费A在线视频| 综合一区自拍亚洲综合图区| 又爽又高潮的BB视频免费看| 免费视频成人国产精品网站| 亚洲精品无码av天堂| 国产拍拍拍无码视频免费| 亚洲人成电影福利在线播放| 亚洲视频免费一区| 亚洲午夜无码久久| 亚洲不卡AV影片在线播放| 国产自国产自愉自愉免费24区| 久久夜色精品国产噜噜噜亚洲AV| 国产精品久久久久免费a∨| 亚洲av成人无码网站…| 中文字幕亚洲综合久久男男| 国产色爽免费无码视频| 亚洲综合久久1区2区3区| 欧美a级成人网站免费| 国产亚洲精品欧洲在线观看| 亚洲精品成人a在线观看| 精品免费视在线观看| 亚洲国产成人精品无码一区二区| 在线播放高清国语自产拍免费 | 久久国产乱子免费精品| 亚洲欧洲日本天天堂在线观看| 免费无码又爽又刺激聊天APP| 男男gvh肉在线观看免费| 日本亚洲视频在线| 男男AV纯肉无码免费播放无码| 在线观看国产一区亚洲bd| 亚洲国产三级在线观看| 青草草色A免费观看在线| 日韩精品无码永久免费网站| 久久亚洲AV成人出白浆无码国产| 在线播放免费播放av片| a级毛片无码免费真人久久| 亚洲欧洲无码一区二区三区|