If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix engine or client ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-11, 16:21
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Informix engine or client ??

Hi Guys,

I am in need to know how to detect if an informix client is installed on the machine. For example if dbaccess is not part of the informix client then what other option is there for me to connect to remote databases via client.

Please help

Regards
DBFinder
Reply With Quote
  #2 (permalink)  
Old 12-19-11, 19:52
domusonline domusonline is offline
Registered User
 
Join Date: Nov 2010
Posts: 12
Quote:
Originally Posted by DBFinder View Post
Hi Guys,

I am in need to know how to detect if an informix client is installed on the machine. For example if dbaccess is not part of the informix client then what other option is there for me to connect to remote databases via client.

Please help

Regards
DBFinder
Typical customer environments may have isql (Informix SQL) which is a client tool (text mode).
There are also other tools that can run SQL against a remote database like sqlcmd which is available at the IIUG software repository (IIUG = International Informix User Group).

Besides that you can use JDBC...
Most recent Client SDK versions already include dbaccess.

Regards.
Reply With Quote
  #3 (permalink)  
Old 12-19-11, 20:44
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Quote:
Originally Posted by domusonline View Post
Typical customer environments may have isql (Informix SQL) which is a client tool (text mode).
There are also other tools that can run SQL against a remote database like sqlcmd which is available at the IIUG software repository (IIUG = International Informix User Group).
Regards.
Thanks, good info.

Further the question is that : How can I detect which client can be used for running my script against remote server.

Currently my script is using dbaccess with following syntax. Some one raised question, what if dbaccess is not available ??

Code:
dbaccess - conn.sql run.sql >${sub_out} 2>&1
conn.sql is prepared at run time having a line like
Code:
connect to 'sysmaster$ifx040' user 'dbfinder' using 'dbfound';
Where as run.sql contains various SQL scripts as needed.

So next task is to detect existance of 1) dbaccess 2) isql 3) sqlcmd . . . x) xsql,
so that the script can choos a client to continue instead of aborting !!

Thanks for help

DBFinder
Reply With Quote
  #4 (permalink)  
Old 01-02-12, 03:03
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
Hi Db,


long time no talk :-)

Just to mess your life a bit more: why don't you take a look at Perl DBI::Informix module. You can rewrite the Query part of dbaccess in about 100 lines, comments and blank lines included. Just for fun!

Regards
Eric
Reply With Quote
  #5 (permalink)  
Old 01-02-12, 06:37
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Eric,

Good Idea, I will do that later; current job ( project ) completes in a week, which is strictly a Korn Shell Script project.

Thanks for the idea.
DBFinder
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On