dotConnect for Oracle Documentation
Devart.Data.Oracle Namespace / OracleConnectionStringBuilder Class / Server Property

In This Topic
Server Property (OracleConnectionStringBuilder)
In This Topic
Gets or sets the name of TNS alias of the Oracle database to which to connect.
Syntax
'Declaration
 
Public Property Server As String
 

Property Value

The name of TNS alias of the Oracle database to which to connect. The default value is an empty string ("").
Remarks

In OracleConnection.Direct mode this property represents host name or IP address of the database server.

In this property you can choose a Home to work with. Homes are enumerated in file named tnsnames.ora. You can use Server property to specify the server detailed instead of alias:
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER)(PORT = 1521))) (CONNECT_DATA = (SID = ORCL)))
This is particularly useful for Instant Client, which can be used with Server property set this way. dotConnect for Oracle searches for Instant Client in directories specified by PATH environment variable.

For a Direct mode connections allow shortened connection string form, specifying several other parameters in the Server parameter in one of the following ways:

<protocol>://<domain_name_or_IP_address>:<port>:<SID> or <protocol>://<domain_name_or_IP_address>:<port>/<Service_name>

Here protocol can be either tcps for SSL connections or ssh for SSH connections. For other cases, the <protocol>:// part is omitted.

Every part except the <domain_name_or_IP_address> is optional, and every part except protocol can be specified via it's own connection string parameter.

For example:

Server=192.168.10.137:1521/ORACLE19
See Also