Re: Query optimisation with QUERY SELECTION
Date: 08-02-10
From: Luc Devar <Luc_at_ldevar.com>
> Have you tried tns ping? That's the first place I start when trying
> to track down connection problems. Try it from the command line; if
> TNS ping can see the server, then you know the tnsnames.ora file is
> working OK and your Oracle network setup is good.
>
Tried tnsping and SQL Plus with succes.
> Have you tried it with OCI? If neither OCI or ODBC works, it may not
> be a 4D issue. Does ODBC work from something else, like Excel?
>
Tried the ODBC connection with Excel with succes.
> A while ago I had an issue connecting via OCI, and the only way I
> could get it to work was to define the database name as the full
> path (as you would enter it in the tnsnames.ora file). For example:
>
> (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XXX.XXX.XXX.XXX)
> (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=MyServiceName)))
>
> Does the ODBC admin window allow you to define the database name
> this way? It may be worth trying.
This the entry in the tnsnames for the oracle database, unfortunatly
the ODBC administrator does not allow me to enter the full path.
Seems it only accept SID.
(description =(address_list =(address = (protocol=tcp) (host=hsp)
(port=1521))(address = (protocol=tcp) (host=hsp) (port=1526)))
(connect_data = (sid=EVAA)))
I also have some code with 4D OCI, in fact I'm using OCI Mapper .
In the OD Login method, at the following lines of code $Status:=OCIServerAttach
($srvhp;$errhp;$ServName)
I'm getting an ORA-12154 Tns not resolved where $ServName is egal to
EVAA (the sid)
Also tried with full path, same error message.
Just a reminder from the previous message, this only append with Oracle.
Seems that 4D is unable to find the tnsnames.ora file.
> Regards,
> Ben Kershaw
**********************************************************************
The New 4D Partner Program - All the tools you need to be a successful 4D Developer.
Sign up Now: http://www.4d.com/community/partner/registration.html
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe_at_lists.4D.com
**********************************************************************