本文共 12749 字,大约阅读时间需要 42 分钟。
操作系统:
oracle10:~ # uname -aLinux oracle10 2.6.16.21-0.8-default #1 SMP Mon Jul 3 18:25:39 UTC 2006 ia64 ia64 ia64 GNU/Linuxoracle10:~ # cat /etc/issueWelcome to SUSE Linux Enterprise Server 10 (ia64) - Kernel r (l).
oracle10:~ # su - oracle
:~> envLESSKEY=/etc/lesskey.binNNTPSERVER=newsINFODIR=/usr/local/info:/usr/share/info:/usr/infoMANPATH=/usr/local/man:/usr/share/man:/usr/X11R6/man:/opt/gnome/share/manHOSTNAME=oracle10GNOME2_PATH=/usr/local:/opt/gnome:/usrXKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDBHOST=oracle10SHELL=/bin/bashTERM=vt100PROFILEREAD=trueHISTSIZE=1000NLS_LANG=AMERICAN_AMERICA.ZHS16GBKMORE=-slGROFF_NO_SGR=yesJRE_HOME=/usr/lib/jvm/jreUSER=oracleLS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:LD_LIBRARY_PATH=/opt/oracle/product/10.2/db_1/lib:/opt/oracle/product/10.2/db_1/ctx/libORA_NLS10=/opt/oracle/product/10.2/db_1/nls/dataORACLE_SID=orclXNLSPATH=/usr/X11R6/lib/X11/nlsENV=/etc/bash.bashrcORACLE_BASE=/opt/oracle/HOSTTYPE=ia64FROM_HEADER=PAGER=lessCSHEDIT=emacsXDG_CONFIG_DIRS=/usr/local/etc/xdg/:/etc/xdg/:/etc/opt/gnome/xdg/MINICOM=-c onTNS_ADMIN=/opt/oracle/product/10.2/db_1/network/adminMAIL=/var/spool/mail/oraclePATH=/opt/oracle/product/10.2/db_1//bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/oracle/product/10.2/db_1/bin:.CPU=ia64INPUTRC=/opt/oracle/.inputrcPWD=/opt/oracleLANG=en_US.UTF-8PYTHONSTARTUP=/etc/pythonstartAGENT_HOME=/opt/oracle/product/10.2/agentTEXINPUTS=:/opt/oracle/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeXQT_SYSTEM_DIR=/usr/share/desktop-dataSHLVL=1HOME=/opt/oracleLESS_ADVANCED_PREPROCESSOR=noOSTYPE=linuxLS_OPTIONS=-N --color=tty -T 0XCURSOR_THEME=IndustrialWINDOWMANAGER=/usr/X11R6/bin/gnomeGTK_PATH=/usr/local/lib/gtk-2.0:/opt/gnome/lib/gtk-2.0:/usr/lib/gtk-2.0LESS=-M -IMACHTYPE=ia64-suse-linuxLOGNAME=oracleXDG_DATA_DIRS=/usr/local/share/:/usr/share/:/etc/opt/kde3/share/:/opt/kde3/share/:/opt/gnome/share/CLASSPATH=/opt/oracle/product/10.2/db_1/JRE:/opt/oracle/product/10.2/db_1/jlib:/opt/oracle/product/10.2/db_1/rdbms/jlib:/opt/oracle/product/10.2/db_1/network/jlibACLOCAL_FLAGS=-I /opt/gnome/share/aclocalPKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig:/opt/gnome/share/pkgconfigLESSOPEN=lessopen.sh %sINFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/infoORACLE_HOME=/opt/oracle/product/10.2/db_1/LESSCLOSE=lessclose.sh %s %sG_BROKEN_FILENAMES=1JAVA_ROOT=/usr/lib/jvm/jreCOLORTERM=1_=/usr/bin/env:~> cat .bashrc# Sample .bashrc for SuSE Linux# Copyright (c) SuSE GmbH Nuernberg# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all# settings made here will also take effect in a login shell.## NOTE: It is recommended to make language settings in ~/.profile rather than# here, since multilingual X sessions would not work properly if LANG is over-# ridden in every subshell.# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)#export EDITOR=/usr/bin/vim#export EDITOR=/usr/bin/mcedit# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server# If you want to use a Palm device with Linux, uncomment the two lines below.
# For some (older) Palm Pilots, you might need to set a lower baud rate# e.g. 57600 or 38400; lowest is 9600 (very slow!)#export LANG=en_US.UTF-8
export ORACLE_SID=orcl export ORACLE_BASE=/opt/oracle/ export ORACLE_HOME=/opt/oracle/product/10.2/db_1/ export PATH=$ORACLE_HOME/bin:$PATH:. export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK test -s ~/.alias && . ~/.alias || true:~> :~> sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 29 21:55:01 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> exit
Disconnected:~> ps -ef | grep oracleoracle 7873 7843 0 08:35 pts/5 00:00:00 su - oracleoracle 7874 7873 0 08:35 pts/5 00:00:00 -bashoracle 1451 28961 0 21:32 pts/3 00:00:00 su - oracleoracle 1452 1451 0 21:32 pts/3 00:00:00 -bashroot 1500 4046 0 21:33 ? 00:00:00 sshd: oracle [priv] oracle 1502 1500 0 21:33 ? 00:00:05 sshd: oracle 1503 1502 0 21:33 ? 00:00:00 /usr/X11R6/bin/xterm -ls -display localhost:10.0oracle 1529 1503 0 21:33 pts/4 00:00:00 -bashoracle 4960 1 0 21:52 ? 00:00:00 ora_pmon_orcloracle 4962 1 0 21:52 ? 00:00:00 ora_psp0_orcloracle 4964 1 0 21:52 ? 00:00:00 ora_mman_orcloracle 4966 1 0 21:52 ? 00:00:00 ora_dbw0_orcloracle 4968 1 0 21:52 ? 00:00:00 ora_lgwr_orcloracle 4970 1 0 21:52 ? 00:00:00 ora_ckpt_orcloracle 4972 1 0 21:52 ? 00:00:00 ora_smon_orcloracle 4974 1 0 21:52 ? 00:00:00 ora_reco_orcloracle 4976 1 0 21:52 ? 00:00:00 ora_cjq0_orcloracle 4978 1 0 21:52 ? 00:00:00 ora_mmon_orcloracle 4980 1 0 21:52 ? 00:00:00 ora_mmnl_orcloracle 4982 1 0 21:52 ? 00:00:00 ora_d000_orcloracle 4984 1 0 21:52 ? 00:00:00 ora_s000_orcloracle 4988 1 0 21:52 ? 00:00:00 ora_arc0_orcloracle 4990 1 0 21:52 ? 00:00:00 ora_arc1_orcloracle 4992 1 0 21:52 ? 00:00:00 ora_arc2_orcloracle 4996 1 0 21:52 ? 00:00:00 ora_qmnc_orcloracle 5013 1 0 21:52 ? 00:00:00 ora_p000_orcloracle 5015 1 0 21:52 ? 00:00:00 ora_p001_orcloracle 5017 1 0 21:52 ? 00:00:00 ora_p002_orcloracle 5019 1 0 21:52 ? 00:00:00 ora_p003_orcloracle 5021 1 0 21:52 ? 00:00:00 ora_p004_orcloracle 5032 1 0 21:52 ? 00:00:00 ora_p005_orcloracle 5034 1 0 21:52 ? 00:00:00 ora_p006_orcloracle 5036 1 0 21:52 ? 00:00:00 ora_p007_orcloracle 5974 1 0 21:53 ? 00:00:00 ora_q000_orcloracle 5990 1 0 21:53 pts/4 00:00:00 /opt/oracle/product/10.2/db_1/perl/bin/perl /opt/oracle/product/10.2/db_1/bin/emwd.pl dbconsole /opt/oracle/product/10.2/db_1/oracle10_orcl/sysman/log/emdb.nohuporacle 6019 5990 16 21:53 pts/4 00:00:23 /opt/oracle/product/10.2/db_1/jdk/bin/java -server -Xmx256M -XX:MaxPermSize=96m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/opt/oracle/product/10.2/db_1 -Doracle.home=/opt/oracle/product/10.2/db_1/oc4j -Doracle.oc4j.localhome=/opt/oracle/product/10.2/db_1/oracle10_orcl/sysman -DEMSTATE=/opt/oracle/product/10.2/db_1/oracle10_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/opt/oracle/product/10.2/db_1/oc4j/j2ee/OC4J_DBConsole_oracle10_orcl/config/jazn.xml -Djava.security.policy=/opt/oracle/product/10.2/db_1/oc4j/j2ee/OC4J_DBConsole_oracle10_orcl/config/java2.policy -Djava.security.properties=/opt/oracle/product/10.2/db_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/opt/oracle/product/10.2/db_1/oracle10_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/opt/oracle/product/10.2/db_1 -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /opt/oracle/product/10.2/db_1/oc4j/j2ee/home/oc4j.jar -config /opt/oracle/product/10.2/db_1/oc4j/j2ee/OC4J_DBConsole_oracle10_orcl/config/server.xmloracle 6136 28929 0 21:53 pts/1 00:00:00 su - oracleoracle 6137 6136 0 21:53 pts/1 00:00:00 -bashoracle 6544 1 0 21:53 ? 00:00:00 ora_q001_orcloracle 7543 5990 1 21:54 pts/4 00:00:00 /opt/oracle/product/10.2/db_1/bin/emagentoracle 7908 1 0 21:55 ? 00:00:00 ora_j000_orcloracle 7915 6137 0 21:55 pts/1 00:00:00 ps -eforacle 7916 6137 0 21:55 pts/1 00:00:00 grep oracle:~>:~> kill -9 4960
:~> kill -9 4962...杀掉进程:~> ps -ef | grep oracle
oracle 7873 7843 0 08:35 pts/5 00:00:00 su - oracleoracle 7874 7873 0 08:35 pts/5 00:00:00 -bashoracle 1451 28961 0 21:32 pts/3 00:00:00 su - oracleoracle 1452 1451 0 21:32 pts/3 00:00:00 -bashroot 1500 4046 0 21:33 ? 00:00:00 sshd: oracle [priv] oracle 1502 1500 0 21:33 ? 00:00:05 sshd: oracle 1503 1502 0 21:33 ? 00:00:00 /usr/X11R6/bin/xterm -ls -display localhost:10.0oracle 1529 1503 0 21:33 pts/4 00:00:00 -bashoracle 6136 28929 0 21:53 pts/1 00:00:00 su - oracleoracle 6137 6136 0 21:53 pts/1 00:00:00 -bashoracle 8504 6137 0 21:57 pts/1 00:00:00 ps -eforacle 8505 6137 0 21:57 pts/1 00:00:00 grep oracle :~> exitlogoutoracle10:~ # su - oracle:~> sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 29 21:57:34 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.Total System Global Area 3305111552 bytes
Fixed Size 1998008 bytesVariable Size 654312264 bytesDatabase Buffers 2634022912 bytesRedo Buffers 14778368 bytesDatabase mounted.Database opened.SQL>然后在企业管理器里面备份测试的时候一直出错:
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 29 22:05:51 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN>
connected to target database (not started)RMAN>
echo set on RMAN> run { 2> allocate channel oem_disk_backup type disk format '/backupset/%U'3> ;backup as COMPRESSED BACKUPSET current controlfile tag '10292007100550';4> restore controlfile validate from tag '10292007100550';5> release channel oem_disk_backup;6> }RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of allocate command at 10/29/2007 22:05:51RMAN-06403: could not obtain a fully authorized sessionORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-ia64 Error: 2: No such file or directory RMAN> allocate channel for maintenance type disk;RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of allocate command at 10/29/2007 22:05:51RMAN-06403: could not obtain a fully authorized sessionORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-ia64 Error: 2: No such file or directory RMAN> delete noprompt backuppiece tag '10292007100550';RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of delete command at 10/29/2007 22:05:51RMAN-12010: automatic channel allocation initialization failedRMAN-06403: could not obtain a fully authorized sessionORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-ia64 Error: 2: No such file or directory RMAN> exit;Recovery Manager complete.
解决办法:
去掉环境变量中最后的/:~> env | grep ORACLE
ORACLE_SID=orclORACLE_BASE=/opt/oracle/ORACLE_HOME=/opt/oracle/product/10.2/db_1/ 改为::~> env | grep ORACLEORACLE_SID=orclORACLE_BASE=/opt/oracleORACLE_HOME=/opt/oracle/product/10.2/db_1 重启dbconsole:~> emctl stop dbconsole:~> emctl start dbconsole 备份还是有问题RMAN> connected to target database (not started) 又发现此时连接数据库的时候有和刚开始一样了:~> sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 30 17:09:49 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
重新把配置文件修改过来,关闭数据库后,修改配置文件重启数据库。 :~> sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 30 18:26:41 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.Total System Global Area 3305111552 bytes
Fixed Size 1998008 bytesVariable Size 335545160 bytesDatabase Buffers 2952790016 bytesRedo Buffers 14778368 bytesDatabase mounted.Database opened.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining options:~> lsnrctl start:~> emctl start dbconsole
启动后测试备份都正常,此文在 这个页面得到了大家的帮助,在此感谢大家. 最后想说一句:细心.来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245794/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/312079/viewspace-245794/