Home » RDBMS Server » Server Administration » How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5)
How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406910] Sun, 07 June 2009 09:49 Go to next message
v_zaitsev
Messages: 12
Registered: May 2009
Location: Manila
Junior Member
I've have a problem guys since I'm a new DBA and with little experience. I successfully created a database server with and OEL5 OS and Oracle 11g installed. If I would create 10 more databases how would i set my SID so that it can be set dynamically and so that before I would run SQLPLUS it would point to the right database?

At my work we have a RHEL4 with 3 different Oracle databases installed 9i,10g,11g what would i normally do is just type the command sid <DATABASE SID> and it automatically sets the SID see example below:

#> sid MLA230DV
Oracle User, 9.x or 10.x  Version
<info> You are now setup for Oracle 10203
ORACLE_SID=MLA230DV
ORACLE_HOME=/orasw/app/oracle/product/10203
oracle@hipposerver /orasw/app/oracle/product


So when i SQLPLUS it would point to the correct database see example below:

#> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jun 7 07:40:30 2009

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning and Data Mining options

SYS on MLA230DV>


I'm asking this because I was asked to create a server with multiple databases on it but this time I will be only using 11g software since the DBA's before me left and nobody is guiding me how things work. How can I go about this? Do I have to create or set this manually or Oracle can automatically handle this kind of situations? Any help would be greatly appreciated.
Re: How to use a specific database on a server with multiple oracle databases [message #406914 is a reply to message #406910] Sun, 07 June 2009 09:53 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>sid <DATABASE SID>
non-standard & site specific.

Post contents on this script,please.
Re: How to use a specific database on a server with multiple oracle databases [message #406916 is a reply to message #406910] Sun, 07 June 2009 09:55 Go to previous messageGo to next message
v_zaitsev
Messages: 12
Registered: May 2009
Location: Manila
Junior Member
how would i know the contents of that script? Im not really good in linux and im just a beginner at it. All i know is if i want to use a specific database I would just use that command

[Updated on: Sun, 07 June 2009 09:57]

Report message to a moderator

Re: How to use a specific database on a server with multiple oracle databases [message #406917 is a reply to message #406910] Sun, 07 June 2009 09:57 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
which sid
will display fully qualified pathname to sid
Re: How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406918 is a reply to message #406910] Sun, 07 June 2009 10:07 Go to previous messageGo to next message
v_zaitsev
Messages: 12
Registered: May 2009
Location: Manila
Junior Member
#> which sid
/usr/bin/which: no sid in (/orasw/app/oracle/product/10203/bin:/spl/sysadm:/usr/local/bin:/opt/Komodo-IDE-4.1/bin:/spl/sysadm:/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin::/orasw/app/oracle/product/10203/opmn/bin)
oracle@sf-lindb-07.us.oracle.com /orasw/app/oracle/product


I don't know if this would help. But where do i find the script?
Re: How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406919 is a reply to message #406910] Sun, 07 June 2009 10:09 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
CUT below

env | sort
alias

PASTE into command window

CUT & PASTE commands & results back here.
Re: How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406920 is a reply to message #406910] Sun, 07 June 2009 10:21 Go to previous messageGo to next message
v_zaitsev
Messages: 12
Registered: May 2009
Location: Manila
Junior Member
oracle@hippolinux /orasw/app/oracle/product #> env | sort

_AST_FEATURES=UNIVERSE - ucb
AWK=nawk
A__z="*OPTIND
_=/bin/env
COBMODE=64
CVS_RSH=ssh
DISPLAY=202.95.238.205:0.0
EDITOR=vi
FPATH=/spl/sysadm/userfuncs
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HNAME=202.95.238.205
HOME=/orasw
HOSTNAME=hippolinux
HOST=hippolinux
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LD_LIBRARY_NAME=/lib:
LD_LIBRARY_PATH=:/orasw/app/oracle/product/10203/lib:/orasw/app/oracle/product/10203/lib32
LESSOPEN=|/usr/bin/lesspipe.sh %s
LIBP=LD_LIBRARY_PATH
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
OPTIND=1
OPT_Q=N
ORACLE_BASE=/orasw/app/oracle
ORACLE_HOME=/orasw/app/oracle/product/10203
ORACLE_SID=MLA230DV
ORATAB=/etc/oratab
PATH=/orasw/app/oracle/product/10203/bin:/spl/sysadm:/usr/local/bin:/opt/Komodo-IDE-4.1/bin:/spl/sysadm:/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin::/orasw/app/oracle/product/10203/opmn/bin
PS1=$LOGNAME@$HOST $PWD
PWD=/orasw/app/oracle/product
SHELL=/usr/bin/ksh
SPLBCKLOGDIR=/tmp
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=202.95.238.205 1650 22
SSH_CONNECTION=202.95.238.205 1650 202.95.238.206 22
SSH_TTY=/dev/pts/1
TERM=xterm
TTY=0
USER=oracle
oracle@hippolinux /orasw/app/oracle/product



oracle@hippolinux /orasw/app/oracle/product #> alias

2d='set -f;_2d'
autoload='typeset -fu'
command='command '
fc=hist
float='typeset -lE'
functions='typeset -f'
hash='alias -t --'
history='hist -l'
integer='typeset -li'
je='. /spl/sysdev/je.sh'
l.='ls -d .* --color=tty'
ll='ls -l --color=tty'
ls='ls --color=tty'
nameref='typeset -n'
nohup='nohup '
o10202='. setoraversion.sh 10202'
o10203='. setoraversion.sh 10203'
o11106='. setoraversion.sh 11.1.0.6'
oagent10g='. setoraversion.sh agent10g'
oowb10201='. setoraversion.sh owb10201'
r='hist -s'
redirect='command exec'
source='command .'
stop='kill -s STOP'
suspend='kill -s STOP $$'
times='{ { time;} 2>&1;}'
type='whence -v'
which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
oracle@hippolinux /orasw/app/oracle/product


I hope this can help. Thanks. Btw what are we looking for?

[Updated on: Sun, 07 June 2009 10:22]

Report message to a moderator

Re: How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406921 is a reply to message #406910] Sun, 07 June 2009 10:28 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
"sid" is hiding well.

> I successfully created a database server with and OEL5 OS and Oracle 11g
>#> sqlplus / as sysdba
>SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jun 7 07:40:30 2009

Contrary to what you assert, currently you are not running V11, but V10.2.0.3

Two environmental variables control Oracle
ORACLE_SID=
ORACLE_HOME=

issue the following & results which will take a while to complete

find / -name sid -print

Re: How to use a specific database on a server with multiple oracle databases - 11g OEL (merged 5) [message #406922 is a reply to message #406910] Sun, 07 June 2009 10:34 Go to previous message
v_zaitsev
Messages: 12
Registered: May 2009
Location: Manila
Junior Member
what im posting right now is from the server at my work... not from my own server sorry for the confusion... yeah i think it will take a lot of time before the command finishes... will get back at you when it finishes.
Previous Topic: How to know the real size of a table (merged 7)
Next Topic: How to modify Freelist Groups while moving from Non-RAC to RAC database in 10g (merged 4)
Goto Forum:
  


Current Time: Sat Dec 10 20:12:59 CST 2016

Total time taken to generate the page: 0.18305 seconds