I m using oracle instant client 19 with C++ occi to connect to oracle 11g . I have setup the client on linux ubuntu 22.04 and setup all the enviournment and tns file exactly . When try with sqlplus connection is working perfectly . but when i try to run the c++ code it show runtime error ORA-12162: TNS:net service name is incorrectly specified. I have tried every single possible check setting enviournment in c++ code for tnsadmin and all possible sequence i have found. But still same error. Can anybody explain this. Why with same env same terminal sqlplus working but it is not in c++.