操作系统:
oracle10:~ # uname -a
Linux oracle10 2.6.16.21-0.8-default #1 SMP Mon Jul 3 18:25:39 UTC 2006 ia64 ia64 ia64 GNU/Linux
oracle10:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 (ia64) - Kernel r (l).
oracle10:~ # su - oracle
oracle@oracle10:~> env
LESSKEY=/etc/lesskey.bin
NNTPSERVER=news
INFODIR=/usr/local/info:/usr/share/info:/usr/info
MANPATH=/usr/local/man:/usr/share/man:/usr/X11R6/man:/opt/gnome/share/man
HOSTNAME=oracle10
GNOME2_PATH=/usr/local:/opt/gnome:/usr
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
HOST=oracle10
SHELL=/bin/bash
TERM=vt100
PROFILEREAD=true
HISTSIZE=1000
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
MORE=-sl
GROFF_NO_SGR=yes
JRE_HOME=/usr/lib/jvm/jre
USER=oracle
LS_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/lib
ORA_NLS10=/opt/oracle/product/10.2/db_1/nls/data
ORACLE_SID=orcl
XNLSPATH=/usr/X11R6/lib/X11/nls
ENV=/etc/bash.bashrc
ORACLE_BASE=/opt/oracle/
HOSTTYPE=ia64
FROM_HEADER=
PAGER=less
CSHEDIT=emacs
XDG_CONFIG_DIRS=/usr/local/etc/xdg/:/etc/xdg/:/etc/opt/gnome/xdg/
MINICOM=-c on
TNS_ADMIN=/opt/oracle/product/10.2/db_1/network/admin
MAIL=/var/spool/mail/oracle
PATH=/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=ia64
INPUTRC=/opt/oracle/.inputrc
PWD=/opt/oracle
LANG=en_US.UTF-8
PYTHONSTARTUP=/etc/pythonstart
AGENT_HOME=/opt/oracle/product/10.2/agent
TEXINPUTS=:/opt/oracle/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
QT_SYSTEM_DIR=/usr/share/desktop-data
SHLVL=1
HOME=/opt/oracle
LESS_ADVANCED_PREPROCESSOR=no
OSTYPE=linux
LS_OPTIONS=-N --color=tty -T 0
XCURSOR_THEME=Industrial
WINDOWMANAGER=/usr/X11R6/bin/gnome
GTK_PATH=/usr/local/lib/gtk-2.0:/opt/gnome/lib/gtk-2.0:/usr/lib/gtk-2.0
G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK
LESS=-M -I
MACHTYPE=ia64-suse-linux
LOGNAME=oracle
XDG_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/jlib
ACLOCAL_FLAGS=-I /opt/gnome/share/aclocal
PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig:/opt/gnome/share/pkgconfig
LESSOPEN=lessopen.sh %s
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/info
ORACLE_HOME=/opt/oracle/product/10.2/db_1/
LESSCLOSE=lessclose.sh %s %s
G_BROKEN_FILENAMES=1
JAVA_ROOT=/usr/lib/jvm/jre
COLORTERM=1
_=/usr/bin/env
oracle@oracle10:~> 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
oracle@oracle10:~>
oracle@oracle10:~> sqlplus / as sysdba
SQL*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
oracle@oracle10:~> ps -ef | grep oracle
oracle 7873 7843 0 08:35 pts/5 00:00:00 su - oracle
oracle 7874 7873 0 08:35 pts/5 00:00:00 -bash
oracle 1451 28961 0 21:32 pts/3 00:00:00 su - oracle
oracle 1452 1451 0 21:32 pts/3 00:00:00 -bash
root 1500 4046 0 21:33 ? 00:00:00 sshd: oracle [priv]
oracle 1502 1500 0 21:33 ? 00:00:05 sshd: oracle@notty
oracle 1503 1502 0 21:33 ? 00:00:00 /usr/X11R6/bin/xterm -ls -display localhost:10.0
oracle 1529 1503 0 21:33 pts/4 00:00:00 -bash
oracle 4960 1 0 21:52 ? 00:00:00 ora_pmon_orcl
oracle 4962 1 0 21:52 ? 00:00:00 ora_psp0_orcl
oracle 4964 1 0 21:52 ? 00:00:00 ora_mman_orcl
oracle 4966 1 0 21:52 ? 00:00:00 ora_dbw0_orcl
oracle 4968 1 0 21:52 ? 00:00:00 ora_lgwr_orcl
oracle 4970 1 0 21:52 ? 00:00:00 ora_ckpt_orcl
oracle 4972 1 0 21:52 ? 00:00:00 ora_smon_orcl
oracle 4974 1 0 21:52 ? 00:00:00 ora_reco_orcl
oracle 4976 1 0 21:52 ? 00:00:00 ora_cjq0_orcl
oracle 4978 1 0 21:52 ? 00:00:00 ora_mmon_orcl
oracle 4980 1 0 21:52 ? 00:00:00 ora_mmnl_orcl
oracle 4982 1 0 21:52 ? 00:00:00 ora_d000_orcl
oracle 4984 1 0 21:52 ? 00:00:00 ora_s000_orcl
oracle 4988 1 0 21:52 ? 00:00:00 ora_arc0_orcl
oracle 4990 1 0 21:52 ? 00:00:00 ora_arc1_orcl
oracle 4992 1 0 21:52 ? 00:00:00 ora_arc2_orcl
oracle 4996 1 0 21:52 ? 00:00:00 ora_qmnc_orcl
oracle 5013 1 0 21:52 ? 00:00:00 ora_p000_orcl
oracle 5015 1 0 21:52 ? 00:00:00 ora_p001_orcl
oracle 5017 1 0 21:52 ? 00:00:00 ora_p002_orcl
oracle 5019 1 0 21:52 ? 00:00:00 ora_p003_orcl
oracle 5021 1 0 21:52 ? 00:00:00 ora_p004_orcl
oracle 5032 1 0 21:52 ? 00:00:00 ora_p005_orcl
oracle 5034 1 0 21:52 ? 00:00:00 ora_p006_orcl
oracle 5036 1 0 21:52 ? 00:00:00 ora_p007_orcl
oracle 5974 1 0 21:53 ? 00:00:00 ora_q000_orcl
oracle 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.nohup
oracle 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.xml
oracle 6136 28929 0 21:53 pts/1 00:00:00 su - oracle
oracle 6137 6136 0 21:53 pts/1 00:00:00 -bash
oracle 6544 1 0 21:53 ? 00:00:00 ora_q001_orcl
oracle 7543 5990 1 21:54 pts/4 00:00:00 /opt/oracle/product/10.2/db_1/bin/emagent
oracle 7908 1 0 21:55 ? 00:00:00 ora_j000_orcl
oracle 7915 6137 0 21:55 pts/1 00:00:00 ps -ef
oracle 7916 6137 0 21:55 pts/1 00:00:00 grep oracle
oracle@oracle10:~>
oracle@oracle10:~> kill -9 4960
oracle@oracle10:~> kill -9 4962
...
杀掉进程
oracle@oracle10:~> ps -ef | grep oracle
oracle 7873 7843 0 08:35 pts/5 00:00:00 su - oracle
oracle 7874 7873 0 08:35 pts/5 00:00:00 -bash
oracle 1451 28961 0 21:32 pts/3 00:00:00 su - oracle
oracle 1452 1451 0 21:32 pts/3 00:00:00 -bash
root 1500 4046 0 21:33 ? 00:00:00 sshd: oracle [priv]
oracle 1502 1500 0 21:33 ? 00:00:05 sshd: oracle@notty
oracle 1503 1502 0 21:33 ? 00:00:00 /usr/X11R6/bin/xterm -ls -display localhost:10.0
oracle 1529 1503 0 21:33 pts/4 00:00:00 -bash
oracle 6136 28929 0 21:53 pts/1 00:00:00 su - oracle
oracle 6137 6136 0 21:53 pts/1 00:00:00 -bash
oracle 8504 6137 0 21:57 pts/1 00:00:00 ps -ef
oracle 8505 6137 0 21:57 pts/1 00:00:00 grep oracle
oracle@oracle10:~> exit
logout
oracle10:~ # su - oracle
oracle@oracle10:~> sqlplus / as sysdba
SQL*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 bytes
Variable Size 654312264 bytes
Database Buffers 2634022912 bytes
Redo Buffers 14778368 bytes
Database mounted.
Database opened.
SQL>
然后在企业管理器里面备份测试的时候一直出错:
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Oct 29 22:05:51 2007
Copyright (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:51
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-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:51
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-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:51
RMAN-12010: automatic channel allocation initialization failed
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-ia64 Error: 2: No such file or directory
RMAN> exit;
Recovery Manager complete.
解决办法:
去掉环境变量中最后的/
oracle@oracle10:~> env | grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/opt/oracle/
ORACLE_HOME=/opt/oracle/product/10.2/db_1/
改为:
oracle@oracle10:~> env | grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/10.2/db_1
重启dbconsole
oracle@oracle10:~> emctl stop dbconsole
oracle@oracle10:~> emctl start dbconsole
备份还是有问题
RMAN>
connected to target database (not started)
又发现此时连接数据库的时候有和刚开始一样了
oracle@oracle10:~> sqlplus / as sysdba
SQL*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>
重新把配置文件修改过来,关闭数据库后,修改配置文件重启数据库。
oracle@oracle10:~> sqlplus / as sysdba
SQL*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 bytes
Variable Size 335545160 bytes
Database Buffers 2952790016 bytes
Redo Buffers 14778368 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
oracle@oracle10:~> lsnrctl start
oracle@oracle10:~> emctl start dbconsole
启动后测试备份都正常,此文在http://www.itpub.net/882010.html 这个页面得到了大家的帮助,在此感谢大家.
最后想说一句:细心.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245794/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/312079/viewspace-245794/