oracle安装后如何链接,安装完oracle后第一次连接都连接到空闲实例

安装完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

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

4f06a01a81d5603cca001c0e92e5ebda.gifi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01

5b24fae4cde99750994428c024162093.gifr=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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值