Re: Easiest way to get databases for a server from UNIX
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Kate_Tomchik@HomeDepot.COM wrote: > > I am writing a shell script that searches all the configs on a machine > for a particular table. I need a way to dynamically get the current > list of database for each config for the search. What is the easiest > way to get this? I don't think it is in any of the system tables, and > I don't know of a way to run tbmonitor in a parameter driven mode. > I'm using version 5.03.uc1 on an HP9.04. > > Currnenty I using the tbcheck -cc option and grepping for > Validating database, but this can take a few minutes on > some of the configs. That is the only way in version 5.x. In version 7.x you can use the sysmaster database. If you have ESQL/C I believe there is a C function call you can make. You might find tbcheck -pe a bit quicker, but the grep command is going to be more complex. Just remember that tbcheck does place locks on tables. Cheers, -- Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+