Hi Angelo - as mentioned i will send you an example program later (sorry
been a bit busy)

What i have done for unidata on linux is the following ...
1. Install the databases odbc library (i.e. MyODBC for MySQL)
2. Environment variables (these are the locations i normally set)
  ODBCSYSINI=/usr/local/etc   - directory where odbc.ini is kept
  ODBCINI=/usr/local/etc/odbc.ini - my shorthand locator for the odbcini
file
  LD_LIBRARY_PATH=/usr/local/lib  - odbc shared library directory. NB the
name of this env var is different by unix type !!
3. relink the shared libraries - this is the relink.udlibs script. This is
set to /usr/local/lib and I ensure the  odbc drivers I require are in this
directory. All this script does is create /.udlibs as a sym link.
4. Setup odbc.ini - this file (as defined in env var ODBCINI) contains the
datasource names and connection info - mysql installs an example one which
you can amend. The snippet below shows a datasource called adprecision
 [adprecision]
 Driver       = /usr/lib/libmyodbc.so
 Description  = MySQL ODBC on localserver
 SERVER       = localhost
 PORT         = 3306
 USER         = admin
 Password     =
 Database     = adprecision
 OPTION       = 3
 SOCKET       =
 TraceFile    = /tmp/odbc.trace
 Trace        = 1

5. Test - use CONNECT datasource at TCL and doa simple sql query.

All of the above was for a MySQL database using the MyODBC library. I don't
think all steps are needed  as above but this always works for me. If
connecting to Oracle there are more steps as there is a driver and a client
that need installing and setting up, and other odbc libraries have their own
funny quirks :(


rgds
Symeon.

On 07/06/06, Angelo Collazo <[EMAIL PROTECTED]> wrote:
>
> Hello fellow groupies,
>
>
> After downloading the document called "Accessing SQL Data through BCI",
> the
> example is from U2 under Windows. It talks about U2 under UNIX but it
> requires additional steps on how setup up ODBC because it is not native to
> UNIX. I have found a .pdf file on the IBM website called Basic SQL client
> Interface Guide for UniVerse. This one shows how from UNIX and UniVerse
> but
> I need UNIX and Unidata.
>
> My Enviroment on UniData versus UniVerse.
>
> 1- I 'm trying to follow the UNIX/UniVerse part of it and I will translate
> all uv....(uvhome vs udhome, uvlibs vs udlibs, ext...) I wanted to now the
> following:
> a- Needs UniRpc and I have UniRpc running in AIX/UniData.
> root:/:# psgrep rpc
>
> Search for "rpc"...
>      UID     PID    PPID   C    STIME    TTY  TIME CMD
>   daemon   98438   86376   0   Apr 22      -  0:00 /usr/sbin/rpc.statd
>     root 1622126       1   0   Jun 04      -  0:01
> /ud/unishared/unirpc/unirpcd
>     root  102792   86376   0   Apr 22      -  0:00 /usr/sbin/rpc.lockd
>
> b- Needs to run relink.uvlibs and I I have relink.udlibs? It shows that it
> requires for UniVerse to be re-started?
>
> Question:
> 1- Not sure if I should execute the relink.udlibs If UniRpc is already
> running?, See My Enviroment #1.
>
> c- Needs a file called UVodbc.config configured but I do NOT have a file
> called UDodbc.config?
>
> Question:
> 2- 2- I found ALL of this files under $UDTHOME:
> root:/:# find ./ -name '*odbc*' -print|more
> ./ud/bin/lib.d/uddlls/libodbc.a
> ./ud/bin/lib.d/uddlls/odbc.so
> ./ud/bin/lib/uddlls/libodbc.a
> ./ud/bin/lib/uddlls/odbc.so
> ./ud/lib/uddlls/libodbc.a
> ./ud/lib/uddlls/odbc.so
>
>                 ./.odbc.ini             ??  INVALID IP Address, could have
> been by predecessor trying
> to setup UniData ODBC at one point?
>                 root:/:# cat ./.odbc.ini
> [MySQL-test]
> Description             = MySQL test database
> Trace           = Off
> TraceFile               = stderr
> Driver          = MySQL
> SERVER          = 192.168.1.26
> USER            = pharvey
> PASSWORD                =
> PORT            = 3306
> DATABASE                = test
>
> [PostgreSQL]
> Description             = PostgreSQL driver for Linux & Win32
> Driver          = /usr/local/lib/libodbcpsql.so
> Setup           = /usr/local/lib/libodbcpsqlS.s
> 3- Talks about using UniAdmin or the UV account for data source creation
> but
> the UniAdmin for the ud/sys for UniData does not have this feature?
> Question:
> 4- What is the equivalent setup of the data source for UniData?
>
> TIA and Cheers fellow groupies.
> Angelo,
> [EMAIL PROTECTED]
>
>
> Angelo
>
> Do you mean ODBC from UniData (BCI) or into UniData (UniODBC?)
>
> For BCI, check the (new) knowledge base at:
> www.mvopen.org/kb/
>
> There is an article on there "Accessing SQL Data through BCI".
> This takes you through the steps and there is demo data/programs
> available.
>
> For ODBC, I have a similar article - but I can't post it yet! (I'm still
> waiting for the official publication before I'm allowed to do that). But
> if
> you email me offlist I can send you a copy.
>
> Brian
>
> >After searching the archive and to no avail, I would like to know if
> anyone
> >has a sample working program or (BCI.DEMO) working that could share a
> copy
> >of it.
> >
> >Cheers,
> >
> >Angelo
> >-------
> >u2-users mailing list
> >u2-users@listserver.u2ug.org
> >To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to