Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Easiest way to get databases for a server from UNIX

0 views
Skip to first unread message

Kate_T...@homedepot.com

unread,
Feb 4, 1997, 3:00:00 AM2/4/97
to


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.

Mark D. Stock

unread,
Feb 5, 1997, 3:00:00 AM2/5/97
to Kate_T...@homedepot.com

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:ma...@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! |
+------------------------+-----------------------------------------+


Jacob Salomon

unread,
Feb 5, 1997, 3:00:00 AM2/5/97
to

> Kate_T...@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.

tbcheck -pe|grep '\.'|grep -v \[A-Z\]|cut -f1 -d:|sort|uniq

This, with some editing errors but good explanation, can be found in
TechNotes Volume-4, Issue 1 (1994).
--
-- Jake (Lost in thought but won't ask for directions)
. .
_..-'( )`-.._
./'. '||\\. }\_/{ .//||` .`\.
./'.|'.'||||\\|.. )o o( ..|//||||`.`|.`\.
./'..|'.|| |||||\`````` \'@'/ ''''''/||||| ||.`|..`\.
./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\.
/'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\
'.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.`
'.||| ||||||||| |/' ``\||`` | ''||/'' `\| ||||||||| |||.`
|/' \./' `\./ \!|\ /|!/ \./' `\./ `\|
V V V }' `\ /' `{ V V V
\ \ \ V / / /
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+

0 new messages