I can connect to a remote SQL Server database via an IP address by using a connection string such as: "Data Source=190.190.200.100,1433;..." where 1433 is the port to use (1433 is the default).

If I use the Microsoft Managed Provider for Oracle, is it possible to connect to a remote Oracle database via an IP address by using a similar connection string such as: "Data Source=190.190.200.100,1521;..." where 1521 is the port? If I understand correctly, 1521 and 1526 are the Oracle listener counterparts to the 1433.

If not, what is the proper connection string syntax to connect to a remote Oracle database?

Thanks ...

Re: Oracle connection string with IP address by Roy

Roy
Sun Jul 25 20:50:05 CDT 2004

The tnsnames.ora file is used by sqlnet to map a net service name alias to
these two components:
1. the connection data
2. network address

These two components are required to:
1. locate a listener (i.e. the host, port, and protocol)
2. identify a specific database instance (i.e. the service name)

If you do not want to use the tnsnames.ora file (and you will get a
millisecond or so performance boost if you don't), you can specify the
parameters directly.

If you routinely specify a net service name of myservice.myorg.com, and if
the entry in the tnsnames.ora file looks something like this:
MYSERVICE.MYORG.COM=
(DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP)(HOST=121.9.9.30)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=HRPROD.MYORG.COM)
)

then anywhere you use this in a connection string:
Data Source=myservice.myorg.com;

you can use the more verbose form of:
Data Source=(DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP)(HOST=121.9.9.30)(PORT=1521))(CONNECT_DATA=(SERVICE_N
AME=HRPROD.MYORG.COM))

The SERVICE_NAME= parameter is for Oracle 8i and later. Prior versions use
the older naming syntax of SID=xxxx. In any case, the SERVICE_NAME value
must
match one of the service names listed SERVICE_NAMES parameter in the
database instance parameter file.

i hope this helps...

regards
roy fine


"RonF" <RonF@discussions.microsoft.com> wrote in message
news:03BAACCE-0276-4166-A07B-D8FD58B68477@microsoft.com...
> I can connect to a remote SQL Server database via an IP address by using a
connection string such as: "Data Source=190.190.200.100,1433;..." where
1433 is the port to use (1433 is the default).
>
> If I use the Microsoft Managed Provider for Oracle, is it possible to
connect to a remote Oracle database via an IP address by using a similar
connection string such as: "Data Source=190.190.200.100,1521;..." where
1521 is the port? If I understand correctly, 1521 and 1526 are the Oracle
listener counterparts to the 1433.
>
> If not, what is the proper connection string syntax to connect to a remote
Oracle database?
>
> Thanks ...



Re: Oracle connection string with IP address by Ron

Ron
Sun Jul 25 23:28:59 CDT 2004

Roy,

I had found only one reference on the web to a similar solution, but wasn't
nearly as detailed and I wasn't sure if it would work.

Thanks for the information and confirmation.

It is very much appreciated.

Ron

"Roy Fine" <rlfine@twt.obfuscate.net> wrote in message
news:%23%23HktOrcEHA.2408@tk2msftngp13.phx.gbl...
> The tnsnames.ora file is used by sqlnet to map a net service name alias to
> these two components:
> 1. the connection data
> 2. network address
>
> These two components are required to:
> 1. locate a listener (i.e. the host, port, and protocol)
> 2. identify a specific database instance (i.e. the service name)
>
> If you do not want to use the tnsnames.ora file (and you will get a
> millisecond or so performance boost if you don't), you can specify the
> parameters directly.
>
> If you routinely specify a net service name of myservice.myorg.com, and if
> the entry in the tnsnames.ora file looks something like this:
> MYSERVICE.MYORG.COM=
> (DESCRIPTION =
> (ADDRESS=(PROTOCOL=TCP)(HOST=121.9.9.30)(PORT=1521))
> (CONNECT_DATA=(SERVICE_NAME=HRPROD.MYORG.COM)
> )
>
> then anywhere you use this in a connection string:
> Data Source=myservice.myorg.com;
>
> you can use the more verbose form of:
> Data Source=(DESCRIPTION =
>
(ADDRESS=(PROTOCOL=TCP)(HOST=121.9.9.30)(PORT=1521))(CONNECT_DATA=(SERVICE_N
> AME=HRPROD.MYORG.COM))
>
> The SERVICE_NAME= parameter is for Oracle 8i and later. Prior versions
use
> the older naming syntax of SID=xxxx. In any case, the SERVICE_NAME value
> must
> match one of the service names listed SERVICE_NAMES parameter in the
> database instance parameter file.
>
> i hope this helps...
>
> regards
> roy fine
>
>
> "RonF" <RonF@discussions.microsoft.com> wrote in message
> news:03BAACCE-0276-4166-A07B-D8FD58B68477@microsoft.com...
> > I can connect to a remote SQL Server database via an IP address by using
a
> connection string such as: "Data Source=190.190.200.100,1433;..." where
> 1433 is the port to use (1433 is the default).
> >
> > If I use the Microsoft Managed Provider for Oracle, is it possible to
> connect to a remote Oracle database via an IP address by using a similar
> connection string such as: "Data Source=190.190.200.100,1521;..." where
> 1521 is the port? If I understand correctly, 1521 and 1526 are the Oracle
> listener counterparts to the 1433.
> >
> > If not, what is the proper connection string syntax to connect to a
remote
> Oracle database?
> >
> > Thanks ...
>
>