Steps to Connect remote Oracle Server using OCi C in Linux - Oracle Call Interface (OCI)

Hi !
I am trying to connect oracle server through my application using OCI C in linux, it works fine in my oracle server machine.
I want to connect oracle server through my C application from Oracle Client Machine
can anyone help me in this issue ?

What issue do you have ? 

Sounds like you did not specify your database name. Or you database name is hard-coded.
Can you show us the code?
Is your TNSNAMES.ORA set up correctly?
Also, you did not specify any error messages or anything. Are you checking the result codes after any functions?


A problem about Proc and oci

I got a new task (coding in c language with oci or proc to operate remote oracle. the develope environment is linux server is windows OS ) ,but I have nothing experice about it previously. in the process of using oci and proc, amount of problems appeared.
the first question i want to make explicit is , can I testing and running the program with out the client of oracle. in a other word ,only use the .so files to compiling and testing .in linux environment .
If the answer is that we can . how can i program with oci or proc?
as I know in the samples of oracle ,every demo is only link to the local database.
and the resource about this field is so limit. I can not find any usable material with google.
in my familar condition ,if we need connect to remote database ,we should provide the hostname or ip address and the prot num of oracle service . but in OCI library ,there are two functions olog and ocilogon can use to log to service .how can i use it?
eg. if the server hostname is dbserver/ and port is 1521,the dbname is iv. how can i use olog or ocilogon to log on the server? thanks very much !!!
btw: if we using proc to connect server. how can i connect to server?
waiting on line...
You must install an Oracle Client in order to proceed. The client installation is included in the Oracle Database installation disc.
Afterwards, use "netca" to configure the connection to your remote DB. Alternatively, you could edit the tnsnames.ora file manually if so you wish.
For reading material, type "Pro*C/C++ Precompiler Programmer's Guide" in google.
Message was edited by:

Help with Remote Login into Oracle 10g

I am new to Oracle and database as such. I have recently installed Oracle 10g. I have created a database "orcl" and am able to login into my database using my user name and password and also using ODBC drivers. However I would like my peers to access my database using remote login.
Please let me know the procedure to allow remote login. Also please let me know the procedure to import an existing database into my database. 
Each of your remote users should have Oracle client and TNSNAMES file or a compatible ODBC driver 
Thanks for your help.
Each of my peers do have Oracle 9i client with them and I tried to provide "tnsnames.ora" with my host details. However connection fails with error "service names could not be resolved". I would like my peers to connect me using ODBC. 
check your tnsname.ora and sqlnet.ora 
I suggest you to send them the sqlnet.ora file too, as probably you have the default_domain clause declared.
If this is the case provide this file too.
You must verify the path environment variable, and verify it there exists another ORACLE_HOME installed. If this is the case, then you'll have make sure the other oracle home positively solves the tnsnames alias too.
~ Madrid. 
Can you please explain more on that, also I have both Oracle 9i Client and Oracle 10g installed on my system. Could this be the problem? 
Thanks a lot guys, after some weird adjustments...and lot of surfing on the net :) I have been able to establish connection.

Reg: connect to oralce db from sql plus client

I have installed the oracle 10 g on linux server . Now i want to connect to that oracle db from my sql plus client from my desktop . i have given the usename and password and connect identifier
uname : sys as sysdba
connect identifier:orcl
but am not able to login am getting the error as could not resolve the connection identified error
i just want to know whether anything i have to configure from my local machine before try connect to the oracle db from client ?
Have you added entry for the database in the tnsnames.ora on your client machine? 
i just want to know whether anything i have to configure from my local machine before try connect to the oracle db from client ?YES 
Have u copied the Tnsenry in the tnsnames.ora file in your client machine ?
thanks for ur reply
i have not configure in the tnsname.ora
let me configure and try connect db
thanks a lot 
Remeber, tnsnames.ora is for the client, regardless of which machine that client is on.
listener.ora is for the host machine. 
i just want to know whether anything i have to configure from my local machine before try connect to the oracle db from client ? Depends on the (not specified) client version : if 10g onwards you may not need any configuration. See Using the Easy Connect Naming Method

How to Configure a workstation to connect with a 10G  XE database

I install 10g xe database on a server. I have a program in vb2008 to aceess database and it runs well in the server. IN remote machines (other PC) what I have to do to make it run well. In my code the string connection is:
Private vg_conn_string As String = "Data Source=xe;Persist Security Info=True;User ID=gestalug;Password=dihmlfyi;Unicode=True"
Can you help me?
Edited by: fvilaca on May 1, 2010 8:35 AM 
Can you help me?Remains to be seen if we can or not.
Does the application use ODBC or some other facility to connect to DB?
What Oracle error code & message result when application tries to access Oracle DB?
Has Oracle client s/w been installed on this workstation?
Post Operating System (OS) name & version for DB server system.(uname -a)
Post results of
SELECT * from v$version 
I cant teel you right now the error becuase i cant test it now...(Im at home and not in my job)
But, does not use odbc. I can change the code and chage connection string. 
Data Source=xeWhat do you get if you tnsping xe from client you are trying to connect? 
I get unknown command....
it cant be...

Connection in Pro*c

Hello Gurus ...
I want to access a remote Oracle 9.2 Database server from my client machine which is running in linux red hat 8.0 through proc.
Hiiii ...
i tried the document too, but can't able to understand,
whether how to configure the machine.
i tried the program in a machine where i the oracle server is running using the default connection string as
"EXEC SQL CONNECT :username IDENTIFIED BY :password ", its working ...
pls help in this reagrd, how to use the AT and USING for my client machine.
The AT keyword identifies the database to which the connection is made, a database identifier declared in a previous DECLARE DATABASE statement.
USING uses the Client SqlNet alias for the database (normally in tnsnames.ora).