Home » Infrastructure » Linux » Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg (Oracle 11.2.0.4.1 , Linux 2.6)
Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619450] Tue, 22 July 2014 11:49 Go to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi ,

There are more than 10 database instances hosted on server slcp01.micro.com and none of the databases are connecting.
For example when i try to connect to one of the database on this server,i get following.
slcp01.micro.com:DRIM01:none:/home/oracle>. oraenv
ORACLE_SID = [none] ? DRIM01
The Oracle base for ORACLE_HOME=/opt/app/oracle/product/11.2.0.4.1 is /opt/app/oracle
slcp01.micro.com:DRIM01:/home/oracle>sqlplus / as sysdba
slcp01.micro.com:DRIM01:/home/oracle>

Can you tell me how to fix this error?

Regards,
Srini

[Updated on: Tue, 22 July 2014 11:49]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619453 is a reply to message #619450] Tue, 22 July 2014 12:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Execute:
env | grep -i ora | sort
which sqlplus

and post the result.

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619455 is a reply to message #619453] Tue, 22 July 2014 12:56 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi Michel,
Here are the results.
slcp01.micro.com:DRIM01:/home/oracle>env | grep -i ora | sort
CLASSPATH=/opt/app/oracle/product/11.2.0.3.2/JRE:/opt/app/oracle/product/11.2.0.3.2/jlib
HOME=/home/oracle
LD_LIBRARY_PATH=/opt/app/oracle/product/11.2.0.4.1/lib:/usr/lib:/usr/local/lib:/etc/lib:/usr/dt/lib:/usr/openwin/lib:/usr/lib/sparcv9:/usr/ucblib/
LOGNAME=oracle
MAIL=/usr/mail/oracle
ORACLE_BASE=/opt/app/oracle
ORACLE_HOME=/opt/app/oracle/product/11.2.0.4.1
ORACLE_SID=DRIM01
PATH=/opt/app/oracle/product/11.2.0.4.1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/ccs/bin:/usr/ucb:.:/opt/app/oracle/product/11.2.0.4.1/bin:/opt/app/oracle/product/11.2.0.3.2/OPatch
PS1=$HOSTNAME:$ORACLE_SID:$PWD>
PWD=/home/oracle
USER=oracle
slcp01.micro.com:DRIM01:/home/oracle>
slcp01.micro.com:DRIM01:/home/oracle>which sqlplus
/opt/app/oracle/product/11.2.0.4.1/bin/sqlplus
slcp01.micro.com:DRIM01:/home/oracle>

Now i am able to connect database when i do export PATH as below
slcp01.micro.com:DRIM01:/home/oracle>export PATH=/opt/app/oracle/product/11.2.0.4.1/bin:$PATH
slcp01.micro.com:DRIM01:/home/oracle>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 22 20:39:27 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 


Also when i do cd path and give sqlplus i am able to connect database as below.
slcp01.micro.com:DRIM01:/home/oracle>cd /opt/app/oracle/product/11.2.0.4.1/bin
slcp01.micro.com:DRIM01:/opt/app/oracle/product/11.2.0.4.1/bin>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 22 20:40:03 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Is there anything i need to add in environment variables to connect to the database without doing export path ?

Regards,
Srini

[Updated on: Tue, 22 July 2014 12:57]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619456 is a reply to message #619455] Tue, 22 July 2014 13:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You must export PATH containing $ORACLE_HOME/bin to use Oracle.
Why don't you want to do it?

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619458 is a reply to message #619456] Tue, 22 July 2014 14:17 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Michel,
Quote:
You must export PATH containing $ORACLE_HOME/bin to use Oracle.

Is this everytime i have to do when i want to connect to database ? There is no permanent fix for this ?

Regards,
Srini

[Updated on: Tue, 22 July 2014 14:20]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619459 is a reply to message #619458] Tue, 22 July 2014 14:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Fix? What fix? It is the way to use a program!
Unset PATH and try to do anything.

Quote:
Why don't you want to do it?

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619461 is a reply to message #619459] Tue, 22 July 2014 14:26 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Michel,
Quote:
Why don't you want to do it?

But i am not doing this in other servers.

In other server I just type the below one to connect database from server.
. oraenv, it will ask for ORACLE SID and give the SID name and connect to database using sqlplus.

Quote:
Unset PATH and try to do anything.

how to unset path and where to unset?

Regards,
Srini

[Updated on: Tue, 22 July 2014 14:26]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619462 is a reply to message #619461] Tue, 22 July 2014 14:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
In other server I just type the below one to connect database from server.


So check what is different.

Quote:
how to unset path and where to unset?


It depends on you shell but "PATH=''" will always work.
Then try "ls"

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619464 is a reply to message #619462] Tue, 22 July 2014 14:50 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Quote:
So check what is different.

Where to check ?

Quote:
It depends on you shell but "PATH=''" will always work.
Then try "ls

Couldn't understand it

[Updated on: Tue, 22 July 2014 14:51]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619466 is a reply to message #619464] Tue, 22 July 2014 14:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
Where to check ?


.profile
.bashrc
...
oraenv
...
everything that is called.

Quote:
Couldn't understand it


What don't you understand?
Execute:
PATH=''
ls

[Updated on: Tue, 22 July 2014 14:58]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619469 is a reply to message #619466] Tue, 22 July 2014 15:57 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Michel,

I compared .profile in both servers and found the only difference is below line added on top of the .profile in other server
where i don't need to export PATH to connect to database.
Is it something that i need to add this line in server where i need to export PATH everytime i connect to database ?

Quote:
slcp01.micro.com:none:/home/oracle>vi .profile
# increasing shell limits
ulimit -S -c unlimited > /dev/null 2>&1
# Set up the terminal, if logged in interactively:

Could you clarify it.

Regards,
Srini

[Updated on: Tue, 22 July 2014 16:01]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #619470 is a reply to message #619469] Tue, 22 July 2014 16:26 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
https://www.google.com/webhp?hl=en&tab=ww#hl=en&q=unix+shell+scripting+tutorial

This problem & solution are external to Oracle & are OFF TOPIC for this forum.

[Updated on: Tue, 22 July 2014 16:28]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #620102 is a reply to message #619470] Mon, 28 July 2014 15:43 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi ,
Quote:
Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg

I keep getting this alert intermittently ( 3 times a day )

I see databases and listeners are up and running.

Can you tell me what could be the problem ?Why i am receiving this alert when everything is fine from my end.

Regards,
Srini

[Updated on: Mon, 28 July 2014 18:06]

Report message to a moderator

Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #620106 is a reply to message #620102] Mon, 28 July 2014 18:37 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
[oracle@localhost ~]$ oerr ora 3135
03135, 00000, "connection lost contact"
// *Cause:  1) Server unexpectedly terminated or was forced to terminate.
//          2) Server timed out the connection.
// *Action: 1) Check if the server session was terminated.
//          2) Check if the timeout parameters are set properly in sqlnet.ora.
Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #620108 is a reply to message #620106] Mon, 28 July 2014 19:34 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi Blackswan,

Thanks for your suggestions.

1.There was no problem with server.Server was acccessible.
2.This is what is see in sqlnet.ora file.
cdp01:ORCL:/opt/oracle10/product/10.2.0/network/admin>cat sqlnet.ora
SQLNET.EXPIRE_TIME=1

Regards,
Srini
Re: Failed to connect to database instance: ORA-03135: connection lost contact (DBD ERROR: OCISessionBeg [message #620142 is a reply to message #620108] Tue, 29 July 2014 07:19 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
Database admin wrote on Mon, 28 July 2014 19:34
Hi Blackswan,

Thanks for your suggestions.

1.There was no problem with server.Server was acccessible.
2.This is what is see in sqlnet.ora file.
cdp01:ORCL:/opt/oracle10/product/10.2.0/network/admin>cat sqlnet.ora
SQLNET.EXPIRE_TIME=1

Regards,
Srini


And what did YOU discover when YOU investigated the meaning of SQLNET.EXPIRE_TIME?
Previous Topic: Add the luns to the mount point
Next Topic: Significant virtual memory paging was detected on the host
Goto Forum:
  


Current Time: Thu Mar 28 14:32:47 CDT 2024