Home » Infrastructure » Linux » Connecting to Oracle 10g on Linux (2 Merged) (Oracle Database 10g R2, OpenSuse 11.3)
Connecting to Oracle 10g on Linux (2 Merged) [message #489687] Tue, 18 January 2011 09:16 Go to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

I need help in configuring Oracle Database.
I Installed 10G R2 software on Linux Machine (running in VirtualBox).
Then I created database named EMC.
Now, I want to connect to it.
When I try to set ORACLE_SID=EMC, and
conn / as sysdba
- it works.

But when I try to connect with
conn system/######@EMC
- I get an error

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

When I try that using SQL DEVELOPER - same error.

What Am I doing wrong.
New to Oracle on Linux.
Thank you.
Connecting to Oracle 10g on Linux [message #489689 is a reply to message #489687] Tue, 18 January 2011 09:17 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

I need help in configuring Oracle Database.
I Installed 10G R2 software on Linux Machine (running in VirtualBox).
Then I created database named EMC.
Now, I want to connect to it.
When I try to set ORACLE_SID=EMC, and
conn / as sysdba
- it works.

But when I try to connect with
conn system/######@EMC
- I get an error

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

When I try that using SQL DEVELOPER - same error.

What Am I doing wrong.
New to Oracle on Linux.
Thank you.
Re: Connecting to Oracle 10g on Linux [message #489690 is a reply to message #489689] Tue, 18 January 2011 09:19 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
>ORA-12154: TNS:could not resolve the connect identifier specified
error means the TNS_ALIAS that was used did not exist within the tnsnames.ora file that was used to resolve the alias.

post content of tnsnames.ora file
Re: Connecting to Oracle 10g on Linux [message #489691 is a reply to message #489690] Tue, 18 January 2011 09:23 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

content of tnsnames.ora file

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

EMCO =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = linuxOracle.site)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EMC)
    )
  )

[Updated on: Tue, 18 January 2011 09:23]

Report message to a moderator

Re: Connecting to Oracle 10g on Linux [message #489693 is a reply to message #489691] Tue, 18 January 2011 09:27 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
>conn system/######@EMC

alias above does not match entry below

>EMCO =

below might work (better)
conn system/######@EMCO

Re: Connecting to Oracle 10g on Linux [message #489697 is a reply to message #489693] Tue, 18 January 2011 09:30 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Doesn't work too.
Re: Connecting to Oracle 10g on Linux [message #489699 is a reply to message #489697] Tue, 18 January 2011 09:34 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
COPY lines below then PASTE results back here

id
env | sort
lsnrctl status
uname -a
lsnrctl service
Re: Connecting to Oracle 10g on Linux [message #489700 is a reply to message #489697] Tue, 18 January 2011 09:39 Go to previous messageGo to next message
John Watson
Messages: 8499
Registered: January 2010
Location: Global Village
Senior Member
Can you connect through the listener, while bypassing the tnsnames.ora file? Try this:
sqlplus user/pass@linuxOracle.site:1521/EMC


(update - added tags)

[Updated on: Tue, 18 January 2011 09:39]

Report message to a moderator

Re: Connecting to Oracle 10g on Linux [message #489702 is a reply to message #489699] Tue, 18 January 2011 09:43 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Oracle@linuxOracle:~> id
uid=1001(Oracle) gid=1001(oinstall) groups=1000(dba),1001(oinstall)


Oracle@linuxOracle:~> env | sort
ALSA_CONFIG_PATH=/etc/alsa-pulse.conf
CLASSPATH=/u01/app/oracle/product/10.2.0/db_1/JRE:/u01/app/oracle/product/10.2.0/db_1/jlib:/u01/app/oracle/product/10.2.0/db_1/rdbms/jlib
COLORTERM=gnome-terminal
CPU=i686
CSHEDIT=emacs
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-tDDVcAXlWy,guid=9f4110285f765b354d350eb40000025b
DESKTOP_SESSION=gnome
DISPLAY=:1.0
ENV=/etc/bash.bashrc
FROM_HEADER=
G_BROKEN_FILENAMES=1
GDM_KEYBOARD_LAYOUT=us
GDM_LANG=en_US.utf8
GDMSESSION=gnome
G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_KEYRING_CONTROL=/tmp/keyring-JCjsek
GNOME_KEYRING_PID=7478
GTK_IM_MODULE=cedilla
HISTSIZE=1000
HOME=/home/Oracle
HOST=linuxOracle
HOSTNAME=linuxOracle
HOSTTYPE=i386
ICEAUTHORITY=/home/Oracle/.ICEauthority
INPUTRC=/home/Oracle/.inputrc
JAVA_BINDIR=/usr/lib/jvm/java/bin
JAVA_HOME=/usr/lib/jvm/java
JAVA_ROOT=/usr/lib/jvm/java
JDK_HOME=/usr/lib/jvm/java
JRE_HOME=/usr/lib/jvm/jre
LANG=en_US.utf8
LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib
LESS_ADVANCED_PREPROCESSOR=no
LESSCLOSE=lessclose.sh %s %s
LESSKEY=/etc/lesskey.bin
LESS=-M -I -R
LESSOPEN=lessopen.sh %s
LIBXCB_ALLOW_SLOPPY_LOCK=1
LOGNAME=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:*.lzma=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:*.xz=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:
LS_OPTIONS=-N --color=tty -T 0
MACHTYPE=i686-suse-linux
MAIL=/var/spool/mail/Oracle
MANPATH=/usr/local/man:/usr/share/man
MINICOM=-c on
MORE=-sl
NNTPSERVER=news
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=EMCO
ORBIT_SOCKETDIR=/tmp/orbit-Oracle
OSTYPE=linux
PAGER=less
PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/home/Oracle/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:.
PILOTPORT=usb:
PROFILEREAD=true
PWD=/home/Oracle
PYTHONSTARTUP=/etc/pythonstart
QT_IM_MODULE=xim
QT_IM_SWITCHER=imsw-multi
QT_SYSTEM_DIR=/usr/share/desktop-data
SDK_HOME=/usr/lib/jvm/java
SDL_AUDIODRIVER=pulse
SESSION_MANAGER=local/linuxOracle:@/tmp/.ICE-unix/7498,unix/linuxOracle:/tmp/.ICE-unix/7498
SHELL=/bin/bash
SHLVL=1
SSH_AUTH_SOCK=/tmp/keyring-JCjsek/ssh
TERM=xterm
TMPDIR=/tmp
USERNAME=Oracle
USER=Oracle
_=/usr/bin/env
WINDOWID=75499863
WINDOWMANAGER=/usr/bin/gnome
WINDOWPATH=8
XAUTHLOCALHOSTNAME=localhost
XAUTHORITY=/var/run/gdm/auth-for-Oracle-RAqdyu/database
XCURSOR_THEME=DMZ
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/share
XDG_SESSION_COOKIE=4847f38a734e4732a26e376a00000518-1295345548.492662-825962963
XKEYSYMDB=/usr/share/X11/XKeysymDB
XMODIFIERS=@im=local
XNLSPATH=/usr/share/X11/nls
XSESSION_IS_UP=yes



Oracle@linuxOracle:~> lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2011 17:29:26

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                18-JAN-2011 16:27:32
Uptime                    0 days 1 hr. 1 min. 53 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxOracle.site)(PORT=1521)))
Services Summary...
Service "DEFAULT" has 1 instance(s).
  Instance "Ecmor", status BLOCKED, has 1 handler(s) for this service...
Service "DEFAULT_XPT" has 1 instance(s).
  Instance "Ecmor", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully



Oracle@linuxOracle:~> uname -a
Linux linuxOracle 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686 i686 i386 GNU/Linux


Oracle@linuxOracle:~> lsnrctl service

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2011 17:32:44

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "DEFAULT" has 1 instance(s).
  Instance "Ecmor", status BLOCKED, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "DEFAULT_XPT" has 1 instance(s).
  Instance "Ecmor", status BLOCKED, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully

Re: Connecting to Oracle 10g on Linux [message #489703 is a reply to message #489700] Tue, 18 January 2011 09:45 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

No, sqlplus user/pass@linuxOracle.site:1521/EMC
didn't work

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Re: Connecting to Oracle 10g on Linux [message #489705 is a reply to message #489703] Tue, 18 January 2011 09:48 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
>ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

DIFFERENT error!

sqlplus
/ as sysdba
startup
exit

issue lines above EXACTLY as presented to start the DB.
Re: Connecting to Oracle 10g on Linux [message #489726 is a reply to message #489705] Tue, 18 January 2011 11:17 Go to previous messageGo to next message
John Watson
Messages: 8499
Registered: January 2010
Location: Global Village
Senior Member
But before you do what BS says: just what is your instance called? In your first post, you wroteQuote:
When I try to set ORACLE_SID=EMC
but in your last post you have Quote:
ORACLE_SID=EMCO
Which is it? The service name and tns alias are also important, and possibly different.

Re: Connecting to Oracle 10g on Linux [message #489735 is a reply to message #489726] Tue, 18 January 2011 13:02 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Yes, I am sorry for misspelling. Instance is called EMCO.
BlackSwan, I cannot issue lines EXACTLY as you presented.




Re: Connecting to Oracle 10g on Linux [message #489736 is a reply to message #489735] Tue, 18 January 2011 13:08 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
>BlackSwan, I cannot issue lines EXACTLY as you presented.
Why not?
open Terminal window & type away.

post COPY of whole session then PASTE commands & results back here.
Re: Connecting to Oracle 10g on Linux [message #489739 is a reply to message #489736] Tue, 18 January 2011 13:14 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Ok,
here we go:


SQL> sqlplus
/ as sysdba
startup
exitSP2-0042: unknown command "sqlplus" - rest of line ignored.
SQL> SP2-0103: Nothing in SQL buffer to run.
SQL> ORA-00119: invalid specification for system parameter LOCAL_LIS
ORA-00132: syntax error or unresolved network name 'LISTENER_EMCO'

Re: Connecting to Oracle 10g on Linux [message #489742 is a reply to message #489739] Tue, 18 January 2011 13:20 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
PLEASE follow directions as I did below
bcm@bcm-laptop:~$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 18 11:19:00 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1553305600 bytes
Fixed Size		    2213656 bytes
Variable Size		 1258293480 bytes
Database Buffers	  285212672 bytes
Redo Buffers		    7585792 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
bcm@bcm-laptop:~$ 
Re: Connecting to Oracle 10g on Linux [message #489744 is a reply to message #489742] Tue, 18 January 2011 13:32 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

It went all wrong, although I managed to connect this way earlier:


Oracle@linuxOracle:/u01/app/oracle/product/10.2.0/db_1/bin> sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 18 21:20:40 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name:  / as sysdba
ERROR:
ORA-01031: insufficient privileges


I'am totally messed up.
Re: Connecting to Oracle 10g on Linux [message #489745 is a reply to message #489744] Tue, 18 January 2011 13:36 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
>uid=1001(Oracle) gid=1001(oinstall) groups=1000(dba),1001(oinstall)

change gid to 1000; then try connect & STARTUP

post COPY & PASTE results
Re: Connecting to Oracle 10g on Linux [message #489747 is a reply to message #489745] Tue, 18 January 2011 13:52 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

How can I change GID?
Re: Connecting to Oracle 10g on Linux [message #489749 is a reply to message #489747] Tue, 18 January 2011 13:55 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
http://www.lmgtfy.com/?q=How+can+I+change+GID+Linux
Re: Connecting to Oracle 10g on Linux [message #489750 is a reply to message #489749] Tue, 18 January 2011 14:08 Go to previous messageGo to next message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Oracle@linuxOracle:~> id
uid=1001(Oracle) gid=1000(dba) groups=100(users),1000(dba)
Oracle@linuxOracle:~> sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 18 21:57:33 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: / as sysdba
ERROR:
ORA-01031: insufficient privileges

Re: Connecting to Oracle 10g on Linux [message #489751 is a reply to message #489750] Tue, 18 January 2011 14:20 Go to previous messageGo to next message
BlackSwan
Messages: 26758
Registered: January 2009
Location: SoCal
Senior Member
UNIX: Checklist for Resolving Connect AS SYSDBA Issues NOTE: 69642.1

When Installation Guide is rigorously followed, no errors occur.
Errors come in two flavors; errors of commission & errors of omission.
I suspect you suffer from the latter; which is more difficult to discern.
Re: Connecting to Oracle 10g on Linux [message #489754 is a reply to message #489750] Tue, 18 January 2011 15:15 Go to previous messageGo to next message
John Watson
Messages: 8499
Registered: January 2010
Location: Global Village
Senior Member
Hello again - if I were you, I would delete the VirtualBox VM and start again. Heaven knows what went wrong. Just create a new VM, and save it before doing the Oracle install.
Two points, though: first, why not install 11.1 or 11.2, instead 10.2? And second, why not use OEL 5.5, instead of SUSE?
Re: Connecting to Oracle 10g on Linux [message #489771 is a reply to message #489754] Wed, 19 January 2011 00:19 Go to previous message
JuicyFruit
Messages: 34
Registered: September 2009
Member

Well, I have saver VM and I will try to nstall Oracle Software once again.
I used OpenSuse because orarun package is avaliable there.
10g version is bacause our software is 10g compatable and optimized for.
Previous Topic: Accidentally uninstalled Oracle 10g XE
Next Topic: Install Oracle 10g on Centos 5 - cannot stat ntcontab.o
Goto Forum:
  


Current Time: Fri Feb 26 01:39:24 CST 2021