Re: Oracle connection Fails



When you say you can't trace it out, what have you used? Are you using
Sql_Trace? That should show you what's attempting to be sent to the server.
If it works on your other machine, than it almost seems more like a problem
w/ a missing dll a la MDAC variety. I might be inclined to think something
was blocking it on the server but you said you can definitely get to the box
from there.. It might be worth getting rid of the concatenated strings and
using a ConnectionStringBuilder just to rule out anything along those
lines - or, just to help isolate things - hard code the connection string
directly without using variables - just temporarily so you make sure
everything is kosher there. I assume you've already verified that all of
those variables are set to the exact values on the client machine right?

--
bill.ryan | technology.evangelist | magenic.technologies
mvp - device application development
http://www.msmvps.com/WilliamRyan
http://www.magenic.com
"Saquib" <saquibirfan@xxxxxxxxx> wrote in message
news:2dc20114-880b-4e51-8a1d-f1bb2a824f17@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,

I have built a simple .Net console application. In which i am trying
to connect to the oracle database by using Oracle data provider
for .Net from ORACLE site and it works fine on my machine. I have
installed the same on my main server but when i run this application
from Our main server i am getting an exception. The exception is as
follows.

'Oracle.DataAccess.Client.OracleException at
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32
rrCode, OracleConnection conn, IntPtr opsErrCt
x, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32
errCode, Oracle
Connection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at TestODACWithWindows2000.Program.Main(String[] args)'


I am not able to trace out the exact cause why it is failing from that
server. While the oracle server is pingable from that server.

My application is as follows


using System;
using System.Collections.Generic;
using System.Text;
using Oracle.DataAccess.Client;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.IO;

namespace TestODACWithWindows2000
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Opening........");
string ConnectionString = "Data
Source=(DESCRIPTION="
+
"(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Host)(PORT=1521)))"
+
"(CONNECT_DATA=(SERVER=DEDICATED)(SID = SID)));"
+ "User
Id=username;Password=password;";

OracleConnection ora = new
OracleConnection(ConnectionString);
try
{

ora.Open();


}
catch (Exception ee)
{
Console.WriteLine("{0} Exception caught.", ee);
Console.ReadLine();
}
}
}
}



Please help me out.. Its urgent.


.



Relevant Pages

  • Re: ORA-03114 Not Connected To Oracle problem.
    ... >Terminal Services and all the sessions are handled by one server. ... >and only one connection to Oracle will fail. ... Likely this is a result from shared pool ...
    (comp.databases.oracle.server)
  • Re: IIS ASP.net Web Services Disconnected
    ... does show no exception, and it is a perfect run on the server-side. ... the connection idle for more than 1/2 hours, ... the server thinks the file is send without problem. ... At the client-side, it times out after 1.5 hours if nothing happen. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to reconnect to a db automatically?
    ... Dim MyConn as new Odbc.connection ... 'The connection could not be opened ... Catch ex as exception ... For instance if the sql server is just rebooting after an update, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: HttpWebRequest.GetRequestStream:Unable to connect to the remot
    ... System.Net.WebException Unable to connect to the remote server at ... Inner exception: System.Net.Sockets.SocketException Message: A connection ... executed on the web server when invoking a remote web service. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.languages.csharp)