views:

319

answers:

3

I have an old server (Solaris 8) running Informix Dynamic Server 2000 Version 9.21.UC4, and I want to get ODBC enabled so that I can get to the data from elsewhere, but I haven't been able to find documentation online about how to do this on the server. I am able to use dbaccess on the server to get to the data just fine, but when I look through the service listing I don't see anything enabled for IDS...

Thoughts? Direction?

Thank you!

Additional thoughts:

  • My server's host name is "r3tmmtx"
  • The informix internal server name seems to be "cms_ol"

My sqlhosts file:

demo_on onipcshm        on_hostname     on_servername
demo_se seipcpip        se_hostname     sqlexec
cms_ol  onipcshm        r3tmmtx         cms_ol
oacms_ol        onipcstr        r3tmmtx oacms_ol

My environment variables with "INFORMIX" in them:

INFORMIXTERM=terminfo
INFORMIXDIR=/opt/informix
INFORMIXSERVER=cms_ol
A: 

IDS is automatically configured to accept ODBC connections when it accepts DB-Access ones too. What is trickier, perhaps, is telling ODBC how to connect to IDS. Here is a .odbc.ini file I used on Solaris - I believe that suitably adapted, it should work for you.

;
;  odbc.ini
;
[ODBC Data Sources]
odbc_demo = IDS 11.50.FC3 stores on black

[odbc_demo]
Driver          = /usr/informix/11.50.FC1/lib/cli/libifcli.so
Description     = IBM Informix CLI 3.50
Server          = black_19
FetchBufferSize = 99
UserName        = jleffler
Password        = PassWord
Database        = stores
ServerOptions   = 
ConnectOptions  = 
Options         = 
ReadOnly        = no
Trace           = yes
TraceFile       = /tmp/odbc.trace

No - that isn't my actual password. I also have a suitably configured sqlhosts file:

black_19        ontlitcp        black   18190
black_19_tcp    ontlitcp        black   18191       s=4,pam_serv=login,pamauth=password
black_19_enc    ontlitcp        black   18192       csm=(black_19_enc)
black_19_shm    onipcshm        black   black_19
black_19_str    onipcstr        black   black_19
black_19_pwd    ontlitcp        black   18193       csm=(black_19_pwd)

The OBDC file uses the first of these entries.

If you are aiming to connect to IDS from a PC, then you need to configure the ODBC connections on the PC, an area I'm anything but an expert in. One of the tools of relevance is SETNET32 (distributed with CSDK on Windows only). You may also need (or want) to configure DSN-less connections - I've not bothered to do so because I usually use ESQL/C rather than ODBC to connect to IDS.

Also, be aware that both IDS 9.30 and 9.40 are out of service now - IDS 9.21 has been out of service for a long time.

Jonathan Leffler
It definitely looks like my server is not configured for TCP connections (see the extra info I added above). What are your thoughts?
Denver
It's fine; set Server = cms_ol in the odbc.ini file; adjust the other values to suit (for example, drop the Trace and TraceFile entries, and adjust the Driver entry). That will only work for ODBC on the Solaris box - if you are connecting from PCs, you will need an oltlitcp server alias. On my box, I have the server name black_19 and server aliases black_19_tcp, black_19_shm and black_19_str; I'm not currently using the others. Adding a server alias means editing the sqlhosts file, the $ONCONFIG file, and then restarting IDS.
Jonathan Leffler
A: 

Look at your /etc/services. There should be something like:

   turbo  1526/tcp                      #Informix server

This means that Informix listens on port 1526. Then use netstat -anp | grep [port] to see if it is listening and visible to others. If it is visible, then install CSDK on other machine and configure ODBC to access your server.

I don't use Solaris so I don't know if netstat has -p flag to show what application is using connection.

Michał Niklas
The system is using IPC mechanisms - streams and shared memory - and the name in the third column of the sqlhosts file is not a service name in that context; it ends up as a file name of some sort (grossly over-simplifying) that must be unique on the system. So, while generally valid, this is not directly applicable to @Denver's situation. Unless he is trying to run ODBC programs on a PC and accessing the IDS server on the Solaris machine - when the fact that he does not have a network connection type is very relevant.
Jonathan Leffler
A: 

Loaded question, is this and Avaya CMS Infromix 9 Database by any chance ? I ask due to the reference to cms_ol in your sqlhosts files which I recognize ie

cms_ol onipcshm r3tmmtx cms_ol

The "onipcshm" configures your server instance to use the shared memory as the IPC for communication with the Informix Server which means you never make a remote connection to that server with any client application (ODBC or other).

This has always been the default configuration of Avaya CMS Informix databases which used the OEM licensed OpenLink Mult-Tier ODBC for Infromix for ODBC connectivity to their CMS applications, as these drivers consist of a thing Geneic ODBC client layer that uses our own communication layer to connect to our Multi-Tier Server components machine that are installed on the Solaris Server and hence can communicate with the Informix Server using shared memory, See,

http://uda.openlinksw.com/mt/informix

So you have two options as I see it:

  1. Download and install the OpenLink Mutli-Tier ODBC Drivers for Informix, which can be downloaded on evaluation from our Web site.

  2. Re-configured your informix server sqlhosts (if allowed to do so) such that it does not use onipcshm, but rather a sockets/TCP method such as ontlitcp to enable connections from remote clients.

I hope this helps

Best Regards

Hugh Williams

Professional Services

OpenLink Software

hwilliams