Not able to create database connection in Oracle connect

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinu1103sharma
Participant
Posts: 13
Joined: Thu May 28, 2015 3:59 am
Location: Pune

Not able to create database connection in Oracle connect

Post by vinu1103sharma »

Hi friends,

Issue - Not able to connect oracle DB in ODBC stage but same database i can connect in ODBC stage.


More description about issue ->
Our DBA has changed the host name like abc@xyz.com to abc@pqr.org in oracle database.
So we also need to update in our infoSpare server in tnsnames.ora file.
I made the all changes in tnsnames.ora file and then update in .odbc.ini and uvodbc.config file.
I have restarted dsengin. Now i have check connection in ODBC stage i am able to connect "abc@pqr.org" database.
But in oracle connector stage i am getting below error-

below error when server name old one "abc@xyz.com"

" The connection could not establish connection Oracle server abc@pqr.org
Method: OCIServerAttach,Error code:12545, Error message ORA-12545:Connection Failed
because target host or object host dones not exist"


below error when server name new "abc@pqr.org"

" The connection could not establish connection Oracle server abc@pqr.org
Method: OCIServerAttach,Error code:12504, Error message ORA-12504:TNS:listener
was not given the SERVICE_NAME in CONNECT_DATA"


Please expert advice me where we need to change the HOST name or if i missed to update any file like tnsnames.ora.
Thanks and Regards,
Vinay Sharma
Sr. BI Consultant
Cell:(IND) 952-766-1393
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why not use the IP address?
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

validate the entry in tnsnames.ora? there may be some issue with the syntax. are you able to connect via sqlplus?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Verify that the host name resolves correctly to the IP address, or just use the IP address instead, as Craig mentioned. Test using ping.

Then try the Oracle command line utility:

tnsping database_name

Most likely, the tnsnames.ora entry could be incorrect.

You may try having the Oracle DBA get on your client to troubleshoot it.

Also make sure you're not blocked by a firewall.
Choose a job you love, and you will never have to work a day in your life. - Confucius
vinu1103sharma
Participant
Posts: 13
Joined: Thu May 28, 2015 3:59 am
Location: Pune

Post by vinu1103sharma »

Hi All,

I don't know, you are able to understand the connector issue or not.

Same IP address/HOST name, i am able to connect in ODBC stage but not able to connect in ORACLE stage.

If my tnsnames.ora file is not correct the i can't connect in ODBC stage also.

I think we need to modify some file in datastage server side for oracle setting or may be we need to add environment parameter.

DS Admin can help on this, how can add new database in datastage and what are need to setting for oracle stage.
Thanks and Regards,
Vinay Sharma
Sr. BI Consultant
Cell:(IND) 952-766-1393
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

vinu1103sharma wrote:If my tnsnames.ora file is not correct the i can't connect in ODBC stage also.
Not true... ODBC uses the .odbc.ini config file. Fix your tnsnames.ora file accordingly.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh, we understand. :wink:

It's all about the tnsnames.ora file as the errors note, there's no "server side Oracle setting" other than that. And ODBC may be working because you are using the thin client. [shrug]

I think you have a DNS or /etc/hosts issue since "all you did" was rename the host server. For grins, edit the tns entry and replace the host name with the IP address. See what happens. You can always change it back.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

qt_ky wrote:
vinu1103sharma wrote:If my tnsnames.ora file is not correct the i can't connect in ODBC stage also.
Not true... ODBC uses the .odbc.ini config file. Fix your tnsnames.ora file accordingly.
From what I recall it uses the config file to point to the tns entry to use, if one is using the thick drivers. Thin... not so much. At least that's what I'm remembering here at home at the crack of dawn. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

OK, so I guess it depends on which ODBC driver--the Oracle driver vs. the Oracle Wire Protocol driver. I've only used the latter (thin) and never had a need to use the thick one because if you've already got the Oracle Client, then what's the point of dropping an ODBC driver on top of it (unless one works in the Redundancy Department of Redundancy)? :lol:
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or the Department of Redundancy Department. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply