c# - Devart dotConnect Express for Oracle Connection with service name -
i have version 9.1.131.0.
i want connect oracle 12 db service name. have login, pw, server, seems can't add service name or port oracleconnectionstringbuilder.
how connect db service name?
i can make happen oracle.manageddataaccess due performance issues want test if devart driver working better.
kind regards
try sid
instead of service name
. found one: using direct mode
sid** system identifier (global database name)
** service name connection string parameter can used instead of sid, in direct mode can connect 1 database instance (rac isn't supported).
for me works:
var str = new dbconnectionstringbuilder(false); str.add("data source", db); str.add("user id", user); str.add("password", pw); var con = new devart.data.oracle.oracleconnection(str.connectionstring); con.open();
you can put full connection string data source instead of retrieving alias tnsnames.ora
file, e.g.
string db = "(description=(address=(protocol=tcp)(host={host})(port=1521))(connect_data=(service_name={servicename})))"; str.add("data source", db);
Comments
Post a Comment