Connect to oracle 9i database in c# from remote desktop - asp.net

How can I get data from oracle 9i database in c# from remote desktop in asp.net application?
The asp.net application will be deployed on one server and Oracle Database on another.
How can I communicate both servers to get data from Oracle Database.
I tried this
string oradb = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=StaticIPAddressOfOracelServers)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=serviceName)));User Id=Administrator;Password=pass;";
OracleConnection conn = new OracleConnection(oradb);
conn.Open();
and I get this exception:
ORA-03111: Break received on communication channel

ODP.NET, Managed Driver supports connecting to Oracle DB server 10.2 or higher. It does not support 9i as stated in this post.

Related

connection string for classic asp application using odbc 11 for sql server

We have a classic asp application, we lost connection with the database. In application server we are able to connect to database only through odbc driver 11 for sql server. Have tried other native client drivers to establish connection which remained unsuccessful. The only supported driver is odbc 11 for sql server.
Have tried following connection strings -
ODBC Driver 11 for SQL Server:
{"Driver={ODBC Driver 11 for SQL Server }; Data Source =servername; Initial Catalog= dbname; Uid=username ; Pwd=password; "}
DSN:
{" DSN=dsnname;Uid=username ; Pwd=password; Database=dbname"}
Still unable to establish connection.
Can you please suggest the connection strings for odbc driver 11 for sql server?
The is an MS fix for these symtoms here https://blogs.msdn.microsoft.com/sqlreleaseservices/tls-1-2-support-for-sql-server-2008-2008-r2-2012-and-2014/
Issue described as below. The list of items fixed includes SQL Native client and ODBC client.
SQL Server Management Studio (SSMS), Report Server, and Report Manager don’t connect to the database engine after you apply the fix for SQL Server 2008, 2008 R2, 2012, or 2014. Report Server and Report Manager fail and return the following error message:
The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable)
This issue occurs because SSMS, Report Manager, and Reporting Services Configuration Manager use ADO.NET, and ADO.NET support for TLS 1.2 is available only in the .NET Framework 4.6. For earlier versions of the .NET Framework, you have to apply a Windows update so that ADO.NET can support TLS 1.2 communications for the client. The Windows updates that enable TLS 1.2 support in earlier versions of .NET framework are listed in the table in the “How to know whether you need this update” section of KB3135244.
Found as to[ Google hit searching for https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=oledb+tls1.2 - there are many more interesting-looking hits in the top ten there that should get you going.
Please come back and self-answer if this solves your issue and there were any other peculiar or unexpected mods you had to make.

Connection establishment between ASP.NET and SQL Server by ADO.Net?

I am using ASP.NET web form application and use ado.net to establish connection between SQL Server and my application to perform CRUD operation. I'd like to know: is any socket used to establish the connection like connection between server and client socket?
Actually I want a know how Ado.net establishes a connection with SQL Server to fetch data. I'd like to know what happens internally. Does Ado.net have any client socket part which connects to a server socket at the SQL Server database?
There is any documentation or article on the web to explain how ADO.net handshakes with SQL Server?
Thanks
That ADO.NET library wraps the OLEDB library which is at a lower layer and in turn encapsulates a lower level native C library called the ODBC. The ODBC opens a socket to the pre-defined SQL Server IP and Port to relays command using SQL Server's native TDS message format.

Remote connection to SQL Server - Asp.net MVC

I'm currently setting up a remote SQL Server. Made all steps regarding remote connection (as found on http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/).
Let's say my servers are :
WEB
SQL
I can connect from WEB, using SQL Server Management Studio, to my SQL Server using my connection string. Using the same connection string in my web.config does not work, keep getting error 26 - Error locating server.
Connection string:
Data Source=169.254.196.1,1433;Initial Catalog=MyDb;User ID=myuser;Password=mypassword
Any ideas?

Connect Oracle 11g to proprietory OLEDB data source

I have an Oracle 11g database, which connects to another Oracle database and has stored procedures to collect data from that source database. The source database is being replaced with a proprietory (OSISoft PI) database which has an OLEDB data provider and I have the task of maintaining the connection. So...
I can see lots of info about an Oracle OLEDB provider allowing Oracle to be a source but nothing about Oracle being a consumer. So...
Can Oracle 11g connect to an OLEDB data source in order for stored procedures in Oracle to query the OLEDB source?

OLE DB Provider for SQL Server works, but not SQL Native Client

I'm running out of ideas so checking if anybody can shed some light.
2 tier Client-server application
SQL Server 2005
Workstation: Windows XP
Client-Server Application 1 uses SQL OLE DB Provider. (Provider=SQLOLEDB.1)
Client-Server Application 2 uses SQL Native Client. (System.Data.SqlClient.SqlConnection)
Somehow, application 1 works well but application 2 needs to have Timeout in connection setting to be 30 seconds to make it work.
Using a tip I learned from JohnnyCoder's Database Connectivity Test with UDL File, I tracked down the problem is somewhere around driver. When I try Microsoft OLE DB Provider for SQL Server, it connects immediately. When I try SQL Native Client, it doesn't take long. It fails even it I set connection timeout to be 60.
Both of the applications work well on other installations but not on one specific site. So it has to be related to some environmental settings such as security, firewall, etc.
I tried installing new SQL Server 2005 Native Client on workstation. No luck.
So my question is:
Why does Application 2 ever make it work when the client actually cannot connect? Is there internal logic to use OLE DB when SQL Native Client timeout happens?
What else would you take a look?
Answer: their network firewall blocked TCP/IP packets.
As a result, SQL Native Client timed out with TCP/IP after 20 seconds and then tried Named Pipe which made it work.

Resources