Groups | Blog | Home
all groups > dotnet ado.net > august 2006 >

dotnet ado.net : Oracle newbie questions


David Thielen
8/28/2006 4:12:01 PM
Hi;

I know SqlServer well but Oracle is new to me. I have a couple of questions
as I get started:

1) Is there a sample somewhere of how to connect to OracleExpress on a
remote computer and do a simple select. In other words the bare minimum to
access the database.

2) Must the Oracle client be installed to access Oracle on a remote
computer? If so, where do I get it?

3) Can the Oracle provided .NET drivers provide integrated security (ie no
need to enter the username & password)?

4) Can the Oracle provided .NET drivers enumerate Oracle servers on the
network like the SqlServer one can?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

v-kevy NO[at]SPAM online.microsoft.com
8/29/2006 2:52:46 AM
Hi Dave,

1. Oracle uses SQL Plue to connect to server and run queries. Here is an
example.

http://www-it.desy.de/systems/services/databases/oracle/sqlplus/sqlplus.html
.en

2. Yes, Oracle client must be installed.

3. Yes, Oracle driver supports integrated security. Please check the
following link:

http://msdn2.microsoft.com/en-us/library/system.data.oracleclient.oracleconn
ection.connectionstring.aspx

4. As far as I know, the driver cannot enumerate servers as SQL Server does.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
David Thielen
8/29/2006 8:51:02 AM
Hi;

Thank you for answers on items 2, 3, & 4.

For item 1 my question was what is the connection string to connect to the
remote system.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
8/30/2006 1:09:24 AM
Hi Dave,

If you're connecting from a .NET app and using an OracleConnection class,
you can also check the following link for how to build a connection string.

http://msdn2.microsoft.com/en-us/library/system.data.oracleclient.oracleconn
ection.connectionstring.aspx

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Valkyrie-MT
8/30/2006 9:54:02 AM
If I were you, I would use the ConnectionStringBuilder classes instead. Here
is a simple example:

public static System.Data.OracleClient.OracleConnection
OracleConnection(string machine, string username, string password)
{
System.Data.OracleClient.OracleConnectionStringBuilder sb =
new System.Data.OracleClient.OracleConnectionStringBuilder();
sb.DataSource = machine;
sb.UserID = username;
sb.Password = password;
sb.PersistSecurityInfo = true;
sb.IntegratedSecurity = false; // Do not use username/password
from windows

return new
System.Data.OracleClient.OracleConnection(sb.ConnectionString);
}


[quoted text, click to view]
AddThis Social Bookmark Button