We help IT Professionals succeed at work.
Get Started

connecting to a remote oracle database using pro*C

srihari_cit
srihari_cit asked
on
3,415 Views
Last Modified: 2016-08-29
Hi guys,
   I am having trouble with connecting to a remote oracle database using pro*c.
Currently my linux machine(say A) has pro*c installed and oracle installed. so im connecting with a string that looks something like this

   exec sql connect :username IDENTIFIED BY :password;

Now i have to shift my code to other linux system(say B). It has  pro*C and oracle installed.
BUT i dont want to use the oracle that is installed in this (B)system, but i want to use
the oracle installed in the other system(A). i guess i need to use a remote database connection string,

In the internet i found some connection string like,

EXEC SQL CONNECT :userid IDENTIFIED BY :password at :db_name using :db_string;

can you please tell me whether this would work and if yes tell me what the 'at' parameter and 'using' parameter is for ?

I am wondering where we have to give the machine name, database name, protocol to use to connect , port etc..etc..
the machine name on which im working is newdelhi.uta.edu and im trying to connect to the remote database in berlin.uta.edu, the database name in berlin.uta.edu is called 'webvigil'.

please give me a solution


Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE