Connect using TNSnames OR How to specify SERVER=DEDICATED

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
rlssv
Posts: 4
Joined: Tue 13 Dec 2016 10:17

Connect using TNSnames OR How to specify SERVER=DEDICATED

Post by rlssv » Thu 30 Mar 2017 13:47

Hi
How do I connect to oracle using TNSnames ?
Alternatively, how do I set the option SERVER=DEDICATED.
In our specific application it is crucial that this is specified because the default would be SHARED or SHAREDSERVER (not sure what it is called).

TnsName =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = somehost)(PORT = 1521))
)
(SERVER = DEDICATED
)
(CONNECT_DATA =
(SERVICE_NAME = somedatabase)
)
)

Regards René/SSV

rlssv
Posts: 4
Joined: Tue 13 Dec 2016 10:17

Re: Connect using TNSnames OR How to specify SERVER=DEDICATED

Post by rlssv » Thu 30 Mar 2017 14:02

When we try to use tnsnames we use these params:
SqlConnFerieKasse.Params.Add('DriverName=DevartOracle');
SqlConnFerieKasse.Params.Add('BlobSize=-1');
SqlConnFerieKasse.Params.Add('Server=SOMETNSNAME');
SqlConnFerieKasse.Params.Add('Oracle TransIsolation=ReadCommited');
SqlConnFerieKasse.Params.Add('FetchAll=True');
SqlConnFerieKasse.Params.Add('User_Name= SomeUser');
SqlConnFerieKasse.Params.Add('Password=SomePassword');
SqlConnFerieKasse.Params.Add('UseQuoteChar=True');

Then we get: Oracle home is not found.
What are we missing ?

René/SSV

MaximG
Devart Team
Posts: 943
Joined: Mon 06 Jul 2015 11:34

Re: Connect using TNSnames OR How to specify SERVER=DEDICATED

Post by MaximG » Thu 06 Apr 2017 14:11

When using dbExprees Driver for Oracle in OCI mode use the Database parameter:

SQLConnection.Params.Values['DataBase'] := TnsName ;

where TnsName is an alias name in the TNSNAMES.ORA file. Before this, make sure that the Oracle client is installed and configured correctly by connecting to Oracle DB with this alias. Also do not forget that Oracle client bitness and the bitness of dbExpess Driver must match.

Post Reply