Moving to Oracle cloud (Autonomous Database) - how to modify web.config connectionstring

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
genesplitter
Posts: 10
Joined: Sat 08 Aug 2009 00:08

Moving to Oracle cloud (Autonomous Database) - how to modify web.config connectionstring

Post by genesplitter » Tue 09 Aug 2022 23:15

What is the format to enter the TNS entry with a wallet to create a direct connection in the web.config?

TNS to Oracle Autonomous Database (Oracle cloud database)

TNS_NAME = (description= (retry_count=<put_count_here>)(retry_delay=<delay_here>)(address=(protocol=tcps)(port=<port>)(host=<oracle_cloud>))(connect_data=(service_name=<name_goes_here>))(security=(ssl_server_cert_dn="<cn_ou_and_more_goes_here>")(MY_WALLET_DIRECTORY=<path_to_wallet>)))

Current web.config (direct connect to local Oracle server):

User Id=my_user_id;Password=my_password;Server=myoracle.mycompany.com;Home=ora102;Direct=True;Sid=sid_here;Port=1234;Persist Security Info=True

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Moving to Oracle cloud (Autonomous Database) - how to modify web.config connectionstring

Post by DmitryGm » Mon 03 Oct 2022 16:47

In your case the connection string to the Oracle Autonomous Database could look like this:

User Id=my_user_id;Password=my_password;Server=tcps://<oracle_cloud>;Direct=True;Service Name=<name_goes_here>;Port=<port>;SSL ServerCertDN=<cn_ou_and_more_goes_here>;SSL WalletPath=<path_to_wallet>;


You can also specify the Server connection string parameter in a format like in the TNS_NAME.
For example:

User Id=my_user_id;Password=my_password;Direct=True;Server=(description= (retry_count=<put_count_here>)(retry_delay=<delay_here>)(address=(protocol=tcps)(port=<port>)(host=<oracle_cloud>))(connect_data=(service_name=<name_goes_here>))(security=(ssl_server_cert_dn="<cn_ou_and_more_goes_here>")(MY_WALLET_DIRECTORY=<path_to_wallet>)));

See also: Using Direct Mode
https://www.devart.com/dotconnect/oracl ... tMode.html

Post Reply