Re: synonyms
Posted in 1999
Another way to get this information is thru dbschema:
dbschema -d <dbname> -s all <outputfile>
HTH,
Steve Romankiw
Jonathan Leffler wrote:
> Kutts Mike wrote:
> > How can I find out through script the synonyms created on all
> > databases and copy the same thing to the database in a different
> > instance.
>
> For each database, you can find the synonyms through the SysTables
> and SysSynTable tables (SysSynonyms doesn't contain anything; it is
> a relic from earlier versions of the servers). If you need to copy
> those definitions to another database, then either you have to work
> hard on some SQL, or you could use dbschema to get the relevant SQL
> statements. The really tricky bit might be handling synonyms in
> dbase1@server1 which reference dbase2@server2, which would not need
> the remote notation when imported to a database in server2.
>
> If you need queries to do this, look in the sqlinfo.ec file in
> the SQLCMD code, available from the IIUG software archive at
> http://www.iiug.org/.
>
> --
> Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
> #include <disclaimer.h>