[Info-ingres] Print a database location from a script.

Roy Hann specially at processed.almost.meat
Thu Nov 27 17:40:28 UTC 2014


Me-ow! wrote:

> In this case, the journal location.
>
> Could use infodb and hack about:
>
> infodb ${dbname} | grep ' JOURNAL ' | awk '{print $3}'
>
> Or (a tiny bit safer but still inelegant):
>
> infodb ${dbname} | grep location | grep ' JOURNAL ' | awk '{print $3}'
>
> Can you think of a nice way?

Nope, not in a script.

If you're prepared to do a little programming take a look in
src/back/dmf/hdr/dm0c.h and src/back/dmf/dmp/dm0c.c for the format of
the config.dat file over the years and write a tool to spit out what you
want.

See also
http://community.actian.com/forum/blogs/rhann/114-reading-ingres-database-configuration-files.html

Roy



More information about the Info-ingres mailing list