Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI - Connecting to Database
Thomas,
Thanks for your response.
I am connecting to the database as 'username/password_at_dbname' where dbname is an entry in 'tnsnames.ora'. As an NT application there is no problem with this. However when I convert this to an NT service I get connected to a different database. The 'dbname' is not being used as whatever name I use I get connected to the same database.
I have checked the listener log on the server. The connect string when I run the same as an application is as follows:
06-JAN-00 16:26:41 *
(CONNECT_DATA=(SID=t09ubk)(CID=(PROGRAM=C:\Harish\CMG-Award
s\VRU\NewDesign\NT\vru_wa.exe)(HOST=W150807)(USER=U02IB94))) *
(ADDRESS=(PROTOCO
L=tcp)(HOST=172.26.67.131)(PORT=1915)) * establish * t09ubk * 0
and log when I run the same as a service is as follows:
06-JAN-00 16:08:01 *
(CONNECT_DATA=(SID=*)(SERVICE_NAME=t09ubk)(CID=(PROGRAM=C:\
Harish\CMG-Awards\VRU\NewDesign\Samplesvc\vsimple.exe)(HOST=W150807)(USER=SYSTEM
))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.26.67.131)(PORT=1894)) *
establish * t09ubk * 0
For some reason the 'olog' call( I am using version 7.3.4 ) is not referring to the 'tnsnames.ora'. As a result the SID field above has '*'. Hope you are someone can tell me what is going on.
Thanks again and good day.
Harish