安裝完oracle後第一次連線都連線到空閒例項
作業系統:
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
:~> 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
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
:~> 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 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
:~> 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 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
:~>
:~> kill -9 4960
:~> kill -9 4962
...
殺掉程式
:~> 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 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
:~> exit
logout
oracle10:~ # su - oracle
:~> 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.
解決辦法:
去掉環境變數中最後的/
:~> env | grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/opt/oracle/
ORACLE_HOME=/opt/oracle/product/10.2/db_1/
改為:
:~> env | grep ORACLE
ORACLE_SID=orcl
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/10.2/db_1
重啟dbconsole
:~> emctl stop dbconsole
:~> emctl start dbconsole
備份還是有問題
RMAN>
connected to target database (not started)
又發現此時連線資料庫的時候有和剛開始一樣了
:~> 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>
重新把配置檔案修改過來,關閉資料庫後,修改配置檔案重啟資料庫。
:~> 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
:~> lsnrctl start
:~> emctl start dbconsole
啟動後測試備份都正常,此文在http://www.itpub.net/882010.html 這個頁面得到了大家的幫助,在此感謝大家.
最後想說一句:細心.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245794/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 例項解析外連線 內連線 自連線 全連線
- 2.4.7 Step 6: 連線到例項
- 連線雲MariaDB例項
- 多個mapreduce連線例項
- c++ 連線mysql例項C++MySql
- 本地SSH方式連線例項
- 解決Oracle 11gR2 空閒連線過多,導致連線數滿的問題Oracle
- PostgreSQL on Linux 安裝和第一次連線SQLLinux
- ORACLE 11G 無法連線到資料庫例項故障排除Oracle資料庫
- Luat例項教程:tcp短連線TCP
- sql 連線查詢例項(left join)三表連線查詢SQL
- Oracle(+)連線與Join連線Oracle
- Oracle左連線,右連線Oracle
- 設定到相同SID仍無法連線例項
- oracle資料庫連線後,hang機一例Oracle資料庫
- ORACLE 半連線與反連線Oracle
- javascript陣列連線程式碼例項JavaScript陣列線程
- 從客戶端連線ASM例項客戶端ASM
- Oracle內連線、外連線、右外連線、全外連線小總結Oracle
- 免安裝oracle軟體連線oracle資料庫Oracle資料庫
- oracle11g使用pl/sql developer連線asm例項OracleSQLDeveloperASM
- oracle 11gR2 配置goldengate連線asm例項OracleGoASM
- oracle10g 使用pl/sql developer連線asm例項OracleSQLDeveloperASM
- Oracle 表連線方式詳解(外連結、內連線、自連線)Oracle
- oracle 10g enterprise manager無法連線到資料庫例項Oracle 10g資料庫
- 【SQL】Oracle的內連線、左外連線、右外連線及全外連線SQLOracle
- Oracle的左連線和右連線Oracle
- oracle 到 db2 通用連線OracleDB2
- jdbc根據例項名 連線 sql serverJDBCSQLServer
- 資料庫例項到nomount 使用連線串無法連線到資料庫 報ORA-12528錯誤資料庫
- python連線Oracle的外掛cx_Oracle安裝PythonOracle
- WMB 使用Compute節點連線Oracle資料庫例項Oracle資料庫
- oracle:一臺主機多個例項,sqlplus 預設連線到哪個例項的問題OracleSQL
- Windows Homestead 離線安裝,帶盒子連線Windows
- docker 安裝redis 以及配置連線DockerRedis
- 安裝配置PGBouncer連線池
- Oracle左外連線、右外連線、完全外連線以及(+)號用法Oracle
- Oracle 左外連線、右外連線、全外連線小總結Oracle