Last post Dec 10, 2010 01:05 AM by anishpsla
Oct 04, 2010 11:40 AM|anishpsla|LINK
I need to find a way to connect to the remote Oracle server without a DSN. There are some practical problem for accessing the server using a DSN. I need a way to connect to Oracle server like I connect to SQL Server etc. For example, in SQL server, I can
connect directly with server using Servername (IP adress) + Username + Password + DB Name. Any way to connect to the Oracle server like in SQL Server we do ??
Please help me.
Oct 05, 2010 04:46 AM|PassHours|LINK
Hope that helps
Oct 05, 2010 05:06 AM|riswadkarharshad|LINK
You can use the following connection string:
Data Source=<OracleDBName>;User Id=<uid>;Password=<pwd>;Integrated Security=no;
Oct 05, 2010 05:53 AM|anishpsla|LINK
I am not an expert in Oracle so I need some more help. How can I get OracleDBName ? Please explain using the following info.
IP for the oracle server - 192.168.1.15
SID - SID123
User Name - User_name
Password - Pass_word
Is it like 192.168.1.15/SID123 ??
Where I need to put the connection string ? Is it on the Web.Config or in the starting of the code like I put it for MYSQL and MSSQL server ??
Oct 05, 2010 06:23 AM|PassHours|LINK
Add the following in your web.config and try
<add key="ConnectionString" value="user id=User_name;data source=SID123;password=Pass_word;Min Pool Size=1;Connection Lifetime=0;Connection Timeout=60;Incr Pool Size=1;Decr Pool Size=1;"/>
Oct 05, 2010 06:54 AM|anishpsla|LINK
After getting several error related to Connection string in web.config, atlast, I maned to use one but I am getting the below error now.
I use the following connection string
<add name="ConnectionString" connectionString="user id=user_name;data source=IP Adress of server/SID;password=Pass_word;"/>
In the CS file, I add
OleDbConnection conn = new OleDbConnection("Provider=msdaora;User Id=user_name;Data Source=IP Adress of server/SID;Persist Security Info=False");
Dec 10, 2010 01:05 AM|anishpsla|LINK
OracleConnection OraCon = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP adress of Oracle server>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<Oracle SID>)));User Id=<Oracle UserName>;Password=<Oracle Password>;");
Works well. I didn't try to execute any SQL, but ASP.Net sucessfully connected to the oracle server.