Hello guys,<o:p></o:p>
Some weeks ago came a subject in my company. Which the better use about connection strings for connection in Oracle’s databases. Between, I should to use complete datasource or use service name of tnsnames.ora. Which is best pratices?<o:p></o:p>
for example:
<add name="XYZ" connectionString="Data Source=XYZ.WORLD;User ID=xyz;Password=xyz;"/>
ou
<add name="XYZ" connectionString="Data Source=(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = off)
(FAILOVER = on)
(ADDRESS_LIST =
(LOAD_BALANCE = on)
(FAILOVER = on)
(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-1.internal.xyz.org.uk)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-2.internal.xyz.org.uk)(PORT = 1522))
)
(ADDRESS_LIST =
(LOAD_BALANCE = on)
(FAILOVER = on)
(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-1.internal.xyz.org.uk)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-1.internal.xyz.org.uk)(PORT = 1522))
)
)
(CONNECT_DATA =
(SERVICE_NAME = UVASA)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = basic)
(RETRIES = 16)
(DELAY = 1)
)
)
);User ID=xyz;Password=xyz;"/>