欢迎Oracle的朋友们,通过交流和学习,互相进步.我通过这个空间把自己的实践和测试都记录下来,与你们共同分享,请多指教 最近读完的书: <<Sybex.OCP.Oracle.10g.Administration.I.Study.Guide>> <<Sybex.OCP.Oracle.10g.Administration.II.Study.Guide>> <<Version3.0-Oracle Database 10g-Administration Workshop I>> <<Version3.0-Oracle Database 10g-Administration Workshop II>> <<Oracle 9i 性能调整指南>>

解决UNIX下@符号报SP2-0734错误

上一篇 / 下一篇  2008-06-20 13:27:38 / 天气: 热 / 心情: 郁闷

今天重起备份服务器,发生数据库down了,检查发现,原来是一个磁盘没有自动挂载

# ioscan -funCdisk
$G+}O/yr/@ j:d5Kq0Class     I  H/W Path       Driver     S/W State   H/W Type     DescriptionITPUB个人空间H7M7r$F[
============================================================================ITPUB个人空间0pj7__mvUn8C
disk      0  0/0/2/0.0.0.0  sdisk      CLAIMED     DEVICE       TEAC    DV-28E-NITPUB个人空间2E%m2H6]h-D?Q#T
                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
1p%| qM~"]+f0disk      1  0/1/1/0.0.0    sdisk      CLAIMED     DEVICE       HP 36.4GST336607LC
;b?&\ u4[0                           /dev/dsk/c2t0d0     /dev/dsk/c2t0d0s2   /dev/rdsk/c2t0d0    /dev/rdsk/c2t0d0s2ITPUB个人空间&C-Wz7T }k
                           /dev/dsk/c2t0d0s1   /dev/dsk/c2t0d0s3   /dev/rdsk/c2t0d0s1  /dev/rdsk/c2t0d0s3ITPUB个人空间EX$C(UC1b"YP
disk      2  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 36.4GST336607LCITPUB个人空间iwaEV)J:lV O
                           /dev/dsk/c2t1d0     /dev/dsk/c2t1d0s2   /dev/rdsk/c2t1d0    /dev/rdsk/c2t1d0s2ITPUB个人空间 E-w{$|)@/KE5@7C;M
                           /dev/dsk/c2t1d0s1   /dev/dsk/c2t1d0s3   /dev/rdsk/c2t1d0s1  /dev/rdsk/c2t1d0s3
/{[5O\&AJ'qR0disk      3  0/1/1/1.2.0    sdisk      CLAIMED     DEVICE       COMPAQ  BD1468A4C5
K"QrA7u9H)M0                           /dev/dsk/c3t2d0   /dev/rdsk/c3t2d0ITPUB个人空间!q2oOI+stU
# pvcreate /dev/rdsk/c3t2d0
'uajSOd@X,A%G0pvcreate: The physical volume already belongs to a volume group
T~t&A!g_0# bdf
$p2g-T;Jf-F!M'Z0Filesystem          kbytes    used   avail %used Mounted on
?;q]J(U s0/dev/vg00/lvol3    1048576  342128  700936   33% /ITPUB个人空间[}k9[(t!M
/dev/vg00/lvol1    1048576  203496  838520   20% /standITPUB个人空间N)tl6[ {Q
/dev/vg00/lvol8    6348800 1499704 4812912   24% /var
Q Mp8n8e,J S6g0/dev/vg00/lvol7    6348800 2850696 3470816   45% /usrITPUB个人空间;a'} J.[5di|(tG
/dev/vg00/lvol6    2097152  102672 1979136    5% /tmpITPUB个人空间aB-h d[
/dev/vgora/lvora   35536896 22132746 12567008   64% /oraITPUB个人空间8mg*tEpR8Re a)H u
/dev/vg00/lvol5    6348800 2816328 3504912   45% /optITPUB个人空间PnI q.wO
/dev/vg00/lvol4    1048576   16672 1023856    2% /home


xTp})n1q/}{0# cd /devITPUB个人空间(b(L9u#hQ}:MU E
# ls |grep vgITPUB个人空间3gc3S3p ^ M:F ^
vg00ITPUB个人空间w.lr&~1f&{P ^
vg01ITPUB个人空间1AK3d"ULt
vgoraITPUB个人空间 dY}Pq4Qeq
#


$Gw`nh7pSM5vDgk0# vgdisplay -v vg01ITPUB个人空间O](r)['n+@E!{B~&w
--- Volume groups ---
4g`h)rR0VG Name                     /dev/vg01
^.?5r y7S0VG Write Access             read/write    
0qg[2@DA7r}N|0VG Status                   available                ITPUB个人空间7Y+MFb w{
Max LV                      255   ITPUB个人空间1] p8U]6h} KB&`D@4q
Cur LV                      1     
5P.V$T:Ur"S`.F0Open LV                     1     ITPUB个人空间0x#p g|aD$T({7t
Max PV                      16    
3ER9n8km~0Cur PV                      1     
1I;ig-e2j!b[GE0Act PV                      1     
%} ^y g)\l:^0Max PE per PV               65535       ITPUB个人空间B9@ BBia?N
VGDA                        2  
;L-m3Cc!E^ I1LP0PE Size (Mbytes)            16             ITPUB个人空间;j ZT2h/m)R9l.z
Total PE                    8749   
0f%O AMMf^:s0Alloc PE                    8749   ITPUB个人空间:Bac*XU#W I
Free PE                     0      ITPUB个人空间Rc0d+D4_QN
Total PVG                   0       
Io c$X9?*w0Total Spare PVs             0             
$eUR ?E0Total Spare PVs in use      0                    

   --- Logical volumes ---ITPUB个人空间7T%p#y$d6H`OP#E!R2J
   LV Name                     /dev/vg01/lvol1
,abKt_y0   LV Status                   available/syncd          
9wxn%`9B*st0   LV Size (Mbytes)            139984         
)NL$]7Tg?0   Current LE                  8749     ITPUB个人空间@-hW'R-d4N
   Allocated PE                8749       
/FjH)om`?k.Ub0   Used PV                     1      

ITPUB个人空间Mm%E*n7a@(\
   --- Physical volumes ---ITPUB个人空间t&]Fsi)Om
   PV Name                     /dev/dsk/c3t2d0
)F;E9bia6`1{-O)R0   PV Status                   available               ITPUB个人空间Dh%R+Z7{*j zM[ q
   Total PE                    8749   ITPUB个人空间 t2g5A2d!m5eo)r
   Free PE                     0      ITPUB个人空间1P:RX{-g#RvO-E k
   Autoswitch                  On       


8t(j rp aT/Z0# mount /dev/vg01/lvol1 /RAC_BACKUPITPUB个人空间nD8r,zCz M|8_Wa
$ bdfITPUB个人空间&@ PKf'W\q
Filesystem          kbytes    used   avail %used Mounted onITPUB个人空间Vu5em,B&Z
/dev/vg00/lvol3    1048576  342128  700936   33% /
|5F} D.X0/dev/vg00/lvol1    1048576  203496  838520   20% /standITPUB个人空间!TV C;eh
/dev/vg00/lvol8    6348800 1499720 4812896   24% /varITPUB个人空间,[TRs1NG{9Nabm
/dev/vg00/lvol7    6348800 2850696 3470816   45% /usrITPUB个人空间hN7@ isHo6H
/dev/vg00/lvol6    2097152  102672 1979136    5% /tmp
7lzq6?z0/dev/vgora/lvora   35536896 22132746 12567008   64% /ora
+I:^)kATl%PrQ @ g$[0/dev/vg00/lvol5    6348800 2816328 3504912   45% /opt
dP td1h/X,u0/dev/vg00/lvol4    1048576   16672 1023856    2% /homeITPUB个人空间1n.rn8L1j6S
/dev/vg01/lvol1    143343616 120302117 21601484   85% /RAC_BACKUP

在/etc/fstab中添加一行,防止下次不能自动挂载

检查错误日志,数据库需要startup upgrade模式下进行升级

Errors in file /ora/app/oracle/admin/baan/udump/baan_ora_4218.trc:ITPUB个人空间hF5v1p*y/|$Z$g
ORA-00704: bootstrap process failure
G7GU(B8g&w g0ORA-39700: database must be opened with UPGRADE option
"MBk!o k qJ/u1m;?}0Fri Jun 20 11:37:35 2008
Kw9D%yl0Error 704 happened during db open, shutting down database
7q6a3G0a!D-Q0USER: terminating instance due to error 704ITPUB个人空间 e%D+hPnNp
Termination issued to instance processes. Waiting for the processes to exit
I3s@8q-wy)Z0Fri Jun 20 11:37:45 2008
{K^vEF0Instance termination failed to kill one or more processes
)S2C(fq"]U0Instance terminated by USER, pid = 4218
oZ HE7q k;L0ORA-1092 signalled during: alter database open...


m%U @ K!zJc0$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jun 20 11:41:11 2008

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup upgradeITPUB个人空间0l2P~}$`*i @6u
ORACLE instance started.

Total System Global Area 1308622848 bytesITPUB个人空间$MFk0?hk1X
Fixed Size                  2055960 bytesITPUB个人空间A} B8W{
Variable Size            1006633192 bytes
P/O0L^K^kTA0Database Buffers          285212672 bytesITPUB个人空间z:_%q4h'GB
Redo Buffers               14721024 bytesITPUB个人空间M&i&|w+xy2m'q
Database mounted.ITPUB个人空间eb"[D]
Database opened.

郁闷的是怎么执行也不识别这个@符号

SQL> @/ora/app/oracle/oracle/product/10.2.0/db_1/rdbms/admin/catupgrd.sqlITPUB个人空间)\+gXpr5N.fB]
SP2-0734: unknown command beginning "/ora/app/o..." - rest of line ignored.

SQL>start /ora/app/oracle/oracle/product/10.2.0/db_1/rdbms/admin/catupgrd.sql

start是可以执行的,查看metalink,

SP2-0734 and/or SP2-0042 Error Immediately When Attempting To Run catpatch.sql
 文档 ID:注释:336920.1类型:PROBLEM
 上次修订日期:12-FEB-2008状态:PUBLISHED

The problem is with the display terminal keyboard settings. The sqlplus session had trouble interpreting the "@" sign, because it was assigned in the terminal to the "kill" setting.  The catpatch.sql script. was supposed to be run as "@catpatch.sql" and since the "@" sign had a completely different meaning for this OS session, sqlplus only saw "catpatch.sql".

原来是UNIX把这个符号识别为kill,而SQL*plus根本不识别,把kill改成其他符号,就可以了ITPUB个人空间8WOB$]{Nzn#]2yx8c
$ stty kill ^u

SQL> @/ora/app/oracle/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql

可以执行了:)ITPUB个人空间m]#@ SQ6bij


TAG:

赵宇的DBA记事本 引用 删除 赵宇   /   2008-06-23 09:27:05
可以看到kill,intr(退出)是Ctrl+C

看来安装之前还要把这些改成自己熟悉的设置
赵宇的DBA记事本 引用 删除 赵宇   /   2008-06-23 09:26:18
对比生产主机来看,STTY的配置已经被改为通用的
$ stty -a
speed 38400 baud; line = 0;
rows = 40; columns = 111
min = 4; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 <undef>; swtch <undef>
stop = ^S; start = ^Q; susp = ^Z; dsusp <undef>
werase = ^W; lnext = ^V
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo -echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
赵宇的DBA记事本 引用 删除 赵宇   /   2008-06-23 09:24:49
看到了吧,KILL=@,所以sqlplus不识别这个
赵宇的DBA记事本 引用 删除 赵宇   /   2008-06-23 09:24:15
我们可以通过stty查看一下目前HPUX的关键符号的设置

$ stty -a
speed 9600 baud; line = 0;
rows = 40; columns = 111
min = 4; time = 0;
intr = DEL; quit = ^\; erase = ^H; kill = @
eof = ^D; eol = ^@; eol2 <undef>; swtch <undef>
stop = ^S; start = ^Q; susp <undef>; dsusp <undef>
werase <undef>; lnext <undef>
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo -echoe -echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
$
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar