Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
ahmed_adel
Contributor
Contributor

how to connect to oracle DB using TNS names programmatically

how to connect to oracle DB using TNS names programmatically without using TNS file name which requires wizard actions.

Labels (3)
1 Reply
tnewbie
Creator II
Creator II

If you have to switch databases/environments on the fly, there are 2 ways of doing it:

1) Have a different set of contexts that point to different environments

2) Use Connection type as 'Oracle Custom' where you will be able to build your Server information as a JDBC string.

Ex for your reference: DB_SERVER=jdbc:oracle:thin:@(DESCRIPTION = (SOURCE_ROUTE=yes) (ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=xxxx)) (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxxxxx)(PORT = xxxx)) (LOAD_BALANCE = YES)(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = xxxxxxxx)(FAILOVER_MODE = (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)) ) )