Page 1 of 1

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

Posted: Tue 09 Aug 2022 23:15
by genesplitter
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

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

Posted: Mon 03 Oct 2022 16:47
by DmitryGm
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