Re: Getting list of available databases from dbaccess?
Posted in 1997
Dmitry Kazarov — — source: Informix-list mailing list archive (1991-1998)
Robert Hale wrote:
>
> Is there a command I pipe into dbaccess that will return a list of all
> available databases on a particular server? I'm looking for something
> similar to the "INFO STATUS" command.
>
To find list of all databases and their owner:
echo "select name, owner from sysdatabases order by owner" | \\
dbaccess sysmaster -
To find a list of all databases and their default dbspace:
echo "select s.name dbspace, d.owner owner, d.name database " \\
"from sysdbspartn d, sysdbstab s " \\
"where trunc(d.partnum/1048576) = s.dbsnum " \\
"order by 1,2,3" | dbaccess sysmaster -
HTH
--
Dmitry Yu. Kazarov
Server Ltd, Moscow
Phone: (+7 095) 434-7647 Fax: (+7 095) 434-8447
mailto:dima@server.ru